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.
When updating the site, the goal is to use the most recent CRAN versions of the modeling/data analysis packages.
-
Get a local copy of the website source.
- Users of devtools/usethis can do:
Note that
usethis::create_from_github("tidymodels/tidymodels.org")
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.
- Users of devtools/usethis can do:
-
Start R in your new
tidymodels.org/
directory. -
To install the required packages, run the code within
installs.R
This file will also install the
keras
python libraries and environments. -
Restart R.
-
You should now be able to render the site in all the usual ways for quarto by calling
quarto render
.
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.
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 namedindex.qmd
. An image file of the cover should be added in the same folder, namedcover.*
. -
find/
: these files make up the find page, linked from the top navbar and resource stickies. Each of these pages is an.qmd
file.
-
To add a new post to
learn/
, add a new folder with aindex.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 thepackages
object ininstalls.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.