This function is responsible for building
.Rmd) files typically
found in the root directory of the package. It will generate the home page
README.md. If none of
these are found, it falls back to the description field in
also builds any files found in
Path to package.
An optional named list used to temporarily override
If you want to include images in your
README.md, they must be stored in
somewhere in the package so that they can be displayed on the CRAN website.
The best place to put them is
man/figures. If you are generating figures
with R Markdown, make sure you set up
fig.path as followed:
1 2 3 4 5
If you have a package logo, you can include it at the top of your README in a level-one heading:
# pkgdown <img src="man/figures/logo.png" align="right" />
init_site() will also automatically create a favicon set from your package
To tweak the home page, you need a section called
The sidebar links are automatically generated by inspecting the
BugReports fields of the
DESCRIPTION. You can add additional links with a
links, which should contain a list of
1 2 3 4
You can remove the first heading with:
home: strip_header: true
The "developers" list is populated by the maintainer ("cre"), authors
("aut"), and funder ("fnd") from the
DESCRIPTION. You can modify their
display on the home page by adding a subsection for
authors. The author
name should match the value in
1 2 3 4
authors: name: href: "http://name-website.com" html: "<img src='name-picture.png' height=24>"
ORCID identification numbers are added to author info if they
are defined in the
1 2 3
Status badges are displayed in the sidebar under the section "Dev status". This section is automatically populated if the first paragraph of the homepage consists solely of status badges as linked images.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.