% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build-articles.R \name{build_articles} \alias{build_articles} \alias{build_article} \alias{build_articles_index} \title{Build articles section} \usage{ build_articles( pkg = ".", quiet = TRUE, lazy = TRUE, override = list(), preview = NA ) build_article(name, pkg = ".", data = list(), lazy = FALSE, quiet = TRUE) build_articles_index(pkg = ".") } \arguments{ \item{pkg}{Path to package.} \item{quiet}{Set to \code{FALSE} to display output of knitr and pandoc. This is useful when debugging.} \item{lazy}{If \code{TRUE}, will only re-build article if input file has been modified more recently than the output file.} \item{override}{An optional named list used to temporarily override values in \verb{_pkgdown.yml}} \item{preview}{If \code{TRUE}, or \code{is.na(preview) && interactive()}, will preview freshly generated section in browser.} \item{name}{Name of article to render. This should be either a path relative to \verb{vignettes/} without extension, or \code{index} or \code{README}.} \item{data}{Additional data to pass on to template.} } \description{ \code{build_articles()} renders each R Markdown file underneath \verb{vignettes/} and saves it to \verb{articles/}. There are two exceptions: \itemize{ \item Files that start with \verb{_} (e.g., \verb{_index.Rmd}) are ignored, enabling the use of child documents in \href{https://bookdown.org/yihui/bookdown/}{bookdown} \item Files in \code{vignettes/tutorials} are handled by \code{\link[=build_tutorials]{build_tutorials()}} } Vignettes are rendered using a special document format that reconciles \code{\link[rmarkdown:html_document]{rmarkdown::html_document()}} with the pkgdown template. This means articles behave slightly differently to vignettes, particularly with respect to external files, and custom output formats. See below for more details. Note that when you run \code{build_articles()} directly (outside of \code{\link[=build_site]{build_site()}}) vignettes will use the currently installed version of the package, not the current source version. This makes iteration quicker when you are primarily working on the text of an article. } \section{Index and navbar}{ You can control the articles index and navbar with a \code{articles} section in your \verb{_pkgdown.yaml}. It defines a list of sections, each of which can contain four fields: \itemize{ \item \code{title} (required): title of section, which appears as a heading on the articles index. \item \code{desc} (optional): An optional markdown description displayed underneath the section title. \item \code{navbar} (optional): A couple of words used to label this section in the navbar. If omitted, this section of vignettes will not appear in the navbar. \item \code{contents} (required): a list of article names to include in the section. This can either be names of individual vignettes or a call to \code{starts_with()}. The name of a vignette includes its path under \code{vignettes} without extension so that the name of the vignette found at \code{vignettes/pizza/slice.Rmd} is \code{pizza/slice}. } The title and description of individual vignettes displayed on the index comes from \code{title} and \code{description} fields of the YAML header in the Rmds. For example, this yaml might be used for some version of dplyr:\if{html}{\out{