Description Usage Arguments YAML config
First looks for index.Rmd
or README.Rmd
, then
index.md
or README.md
. If none are found, falls back to the
description field in DESCRIPTION
.
1 | build_home(pkg = ".", path = "docs", depth = 0L, encoding = "UTF-8")
|
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. |
To tweak the home page, you need a section called home
.
The sidebar will default to containing five sections: links,
code license, citation rules, developers, and dev status.
You can override this ordering or suppress some sections by
adding a subsection called sections
, which should contain a
list of section name elements:
1 2 3 4 5 6 7 |
The default links are, in order: CRAN / Bioconductor package
download links; GitHub / BitBucket repo links (generated by
inspecting the URL
fields of the DESCRIPTION
file); bug
report links (generated by inspecting the BugReports
field
of the DESCRIPTION
file); and any custom links you provide.
You can change the order of the links or suppress some
by adding a subsection called link_order
, which should
consists of a list of section name elements:
1 2 3 4 5 6 | home:
link_order:
- repo
- github
- bug_report
- custom
|
You can add additional links with a subsection called
links
, which should contain a list of text
+ href
elements:
1 2 3 4 |
The code license section is generated by reading the
LICENSE
field of the DESCRIPTION
file. Standard
licenses are automatically linked.
The citation section is generated by reading the
inst/CITATION
file from the package.
The "developers" list is by default populated by the maintainer
("cre"), authors ("aut"), and funder ("fnd") but you can
override this with a section called roles_include
, which
should contain a list of members:
1 2 3 4 | roles_include:
- cre
- aut
- fnd
|
This section must be in the base level of the YML file, not
a subsection under home
: this is because in addition to
populating the "developers" list, these names also populate
the page footer developer list.
Dev status is populated by pulling any badges from the home page contents into the sidebar.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.