8 Meta
Details on how to build the online documentation for the R packages maintained by the Stan Development Team. The RStanARM Developer Notes is built with bookdown and the package documentation is built with pkgdown.
8.1 Building RStanARM Developer Notes
(If you’re including a new chapter then add its file name in the appropriate location in _bookdown.yml
.)
- Open the
dev-notes.Rproj
file in RStudio. - Run
bookdown::serve_book("index.Rmd")
, which renders the site live (automatically recompiling as Rmd files are changed). - Once you’re happy with the changes, move all the files from the
/dev-notes-output
folder into the root directory. This can be done automatically by runninsh cleanup.sh
.
8.2 Building Documentation for RStan
- Update the master branch and merge the new commits into the gh-pages branch.
- Change director to where the RStan package files are located.
- Open the
.Rproj
file in RStudio. - Render the html files with
pkgdown::build_site(pkg = ".", path = "../..")
.
8.3 Building Documentation for the other R packages
- Update the master branch and merge the new commits into the gh-pages branch.
- Open the
.Rproj
file in RStudio. - Check to make sure that the vignette names in
\vignettes
match the names in_pkgdown.yml
. Currently, the vignette file names need to have the same naming convention as R package names (i.e. ‘-’ are not permitted). If there are new vignettes, be sure to include them in the yml file under an appropriate section (or new section). - Render the html files with
pkgdown::build_site(pkg = ".", path = ".")
.