This repo is the source of https://tidyverse.org, and this readme tells you how it all works.
-
If you spot any small problems with the website, please feel empowered to fix them directly with a PR.
-
If you see any larger problems, an issue is probably better: that way we can discuss the problem before you commit any time to it.
This repo (and resulting website) is licensed as CC BY-SA.
This site now uses hugodown rather than blogdown. Install it with:
pak::pkg_install("r-lib/hugodown")-
To add a new post call
hugodown::use_tidy_post("short-name"). This createscontent/blog/short-name/containing anindex.Rmdfile that tells you what to do next. Patterns we use a lot for"short-name":- Package release:
lifecycle-1-0-0,parsnip-0-1-2 - Package (release?) and a specific topic:
dplyr-1-0-0-rowwise,parsnip-adjacent,dplyr-1-0-4-if-any - Topic:
self-cleaning-test-fixtures,taking-control-of-plot-scaling
- Package release:
-
To add a new event call
hugodown::post_create("events/year-event-name"). -
Knit to
.Rmdto generate a.md. -
To preview the site (i.e. turn
.mdinto.html), callhugodown::hugo_start()(you only need to do this once per session as it will continue to run in the background). -
Every blog post has to be accompanied by a photo (precise details are provided in the
.Rmdtemplate). If you don't already have a image in mind, try https://unsplash.com, https://pexels.com, or Jenny Bryan's free photo link collection.
The tidyverse site is automatically published with netlify, so every PR will automatically get a live preview. Once the PR is merged, that preview becomes the live site.
The main difference is that hugodown cleanly separates the process of building the site into two steps: hugodown generates .md from .Rmd, then hugo generates .html from .md. This leads to the following changes:
-
We once again use
.Rmd, which generates.md, not.html. -
.Rmds are only rendered when you explicitly knit them. If you're concerned that an.mdis out of date, callhugodown::site_outdated()to list all.Rmds that need to be re-rendered. -
.Rmdfiles useoutput: hugodown::hugo_documentto which automatically sets the correct chunk knitr options. -
If you want to change an old blog post to use hugodown, you need to rename it from
.Rmarkdownto.Rmd, delete the.markdownfile, and setoutput: hugodown::hugo_documentin the yaml metadata.