-
Notifications
You must be signed in to change notification settings - Fork 2
Maintenance guide
The back end of the website relies on the pkgdown R package. pkgdown primary goal is to provide R package developers with a simple way to produce a good-looking and user-friendly documentation. As such, all content will be generated from items that already exist in packages. In particular:
- the landing page is auto-generated from the file
README.Rmd
orREADME.md
and theDESCRIPTION
file (to create the content on the right: author names, URL of the repository, license, etc.) - the other pages are created by knitting the package vignettes (contained in
the
vignettes/
folder).
Some settings of pkgdown can be tweaked in the _pgkdown.yml
folder. A list of
options that you can customise is available on pgkdown's own pkgdown website.
pkgdown uses bootstrap 3 and bootswatch themes. The
bootswatch theme can pick selected in the _pkgdown.yml
file, as mentioned
earlier.
It is also possible to use custom css or js either:
- sitewide by adding the code to the files
pkgdown/extra.css
orpkgdown/extra.js
. - for a specific page by adding the code withing the Rmarkdown (
.Rmd
) files or by loading external resources, as explained in the Rmarkdown guide.
You can use bootstrap classes in your custom CSS but you should also be careful
about name clashes (e.g., bootstrap already has a container
class so we
renamed our custom containers for the timeline to container-tl
).
The website is auto-deployed via GitHub Actions, and more precisely via the
action defined in pkgdown.yaml
.
This action was modified from the default template provided by
usethis::use_github_action("pkgdown")
. If something breaks with the auto-deploy, it may be worth checking the changes in the upstream file in case it is a general issue and they added a fix on their side
This action runs (and auto-deploys the website) at two times: