Skip to content

tidymodels/tidymodels.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creative Commons License

tidymodels.org

This repo is the source of https://www.tidymodels.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.

Requirements to preview the site locally

R packages

When updating the site, the goal is to use the most recent CRAN versions of the modeling/data analysis packages.

  1. Get a local copy of the website source.

    • Users of devtools/usethis can do:
      usethis::create_from_github("tidymodels/tidymodels.org")
      Note that usethis::create_from_github() works best when it can find a GitHub personal access token and usethis (git2r, really) is configured correctly for your preferred transport protocol (SSH vs HTTPS). Setup advice.
    • Otherwise, use your favorite method to fork and clone or download the repo as a ZIP file and unpack.
  2. Start R in your new tidymodels.org/ directory.

  3. To install the required packages, run the code within

    installs.R
    

    This file will also install the keras python libraries and environments.

  4. Restart R.

  5. You should now be able to render the site in all the usual ways for quarto by calling quarto render.

Quarto

We use the latest release version of quarto. You can install and manage different version with qvm.

The website is set up to render with Netlify in according to quarto documentation.

The files _publish.yml, netlify.toml, and package.json specifies this configuration.

Structure

The source of the website is a collection of .qmd files stored in the folders in this repository. This site is then rendered as a Quarto html website.

  • packages/: this is a top-level page on the site rendered from a single .qmd file.

  • start/: these files make up a 5-part tutorial series to help users get started with tidymodels. Each article is an .qmd file as a page bundle, meaning that each article is in its own folder along with accompanying images, data, and rendered figures.

  • learn/: these files make up the articles presented in the learn section. This section is nested, meaning that inside this section, there are actually 4 subsections: models, statistics, work, develop. Each article is an .qmd file.

  • help/: this is a top-level page on the site rendered from a single .qmd file.

  • contribute/: this is a top-level page on the site rendered from a single .qmd file.

  • books/: these files make up the books page, linked from resource stickies. To add a new book, create a new folder with a new .qmd file inside named index.qmd. An image file of the cover should be added in the same folder, named cover.*.

  • find/: these files make up the find page, linked from the top navbar and resource stickies. Each of these pages is an .qmd file.

Workflow

  • To add a new post to learn/, add a new folder with a index.qmd file in it and adapt the YAML header from an existing post. If new packages are required to run this post, then add them to the packages object in installs.R.

  • To preview the site, render it locally with the latest quarto release version.

  • The site is published via Netlify but rendered locally, so add those files to the PR.

  • To do a complete rerender, run re-render.R script.