The @theme
tag allows adding CSS and JS files to the HTML version of
the manual pages.
To support @theme
, you need to use the roxygenlabs_rd
roclet.
E.g. add this to DESCRIPTION
:
Roxygen: { library(roxygenlabs); list(markdown = TRUE, roclets = c("collate", "namespace", "roxygenlabs_rd")) }
and then use the @theme
tag to add CSS/JS files to all manual pages.
Multiple file names can be specicified in a single @theme
tag, and
file names are relative to the inst/doc
directory, within the package:
#' @theme assets/extra.css assets/rd.js
See the assets/extra.css
and assets/rd.js
files, included in the
package, for an example CSS/JS theme that has the following changes
compared to plain Rd documentation:
@includeRmd
tag.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.