Description Usage Arguments YAML config Supressing vignettes
View source: R/build-articles.R
Each Rmarkdown vignette in vignettes/
and its subdirectories is
rendered. Vignettes are rendered using a special document format that
reconciles rmarkdown::html_document()
with your pkgdown
template.
1 2 | build_articles(pkg = ".", path = "docs/articles", depth = 1L,
encoding = "UTF-8", quiet = TRUE)
|
pkg |
Path to source package. If R working directory is not set to the source directory, then pkg must be a fully qualified path to the source directory (not a relative path). |
path |
Output path. Relative paths are taken relative to the
|
depth |
Depth of path relative to root of documentation. Used to adjust relative links in the navbar. |
encoding |
The encoding of the input files. |
quiet |
Set to |
To tweak the index page, you need a section called articles
,
which provides a list of sections containing, a title
, list of
contents
, and optional description
.
For example, this imaginary file describes some of the structure of the R markdown articles:
1 2 3 4 5 6 7 8 |
Note that contents
can contain either a list of vignette names
(including subdirectories), or if the functions in a section share a
common prefix or suffix, you can use starts_with("prefix")
and
ends_with("suffix")
to select them all. If you don't care about
position within the string, use contains("word")
. For more complex
naming schemes you can use an aribrary regular expression with
matches("regexp")
.
pkgdown will check that all vignettes are included in the index this page, and will generate a warning if you have missed any.
If you want articles that are not vignettes, either put them in
subdirectories or list in .Rbuildignore
. An articles link
will be automatically added to the default navbar if the vignettes
directory is present: if you do not want this, you will need to
customise the navbar. See build_site()
details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.