Skip to content

gregswinehart/tidyverse.org

 
 

Repository files navigation

Netlify Status

tidyverse.org

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.

Workflow

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 creates content/blog/short-name/containing an index.Rmd file 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
  • To add a new event call hugodown::post_create("events/year-event-name").

  • Knit index.Rmd to generate index.md.

  • To preview the site (i.e. turn .md into .html), call hugodown::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 .Rmd template). 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.

Changes from blogdown

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 .md is out of date, call hugodown::site_outdated() to list all .Rmds that need to be re-rendered.

  • .Rmd files use output: hugodown::hugo_document to 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 .Rmarkdown to .Rmd, delete the .markdown file, and set output: hugodown::hugo_document in the yaml metadata.

About

Source of tidyverse.org

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 76.6%
  • CSS 19.9%
  • R 2.9%
  • Other 0.6%