render_page: Render page with template

View source: R/render.r

render_pageR Documentation

Render page with template

Description

Each page is composed of four templates: "head", "header", "content", and "footer". Each of these templates is rendered using the data, and then assembled into an overall page using the "layout" template.

Usage

render_page(pkg = ".", name, data, path = "", depth = 0L)

data_template(pkg = ".", depth = 0L)

Arguments

pkg

Path to package to document.

name

Name of the template (e.g. "home", "vignette", "news")

data

Data for the template.

This is automatically supplemented with three lists:

  • site: title and path to root.

  • yaml: the template key from _pkgdown.yml.

  • package: package metadata including name and version.

See the full contents by running data_template().

path

Location to create file. If "" (the default), prints to standard out.

depth

Depth of path relative to base directory.

YAML config

You can use either the templates provided by pkgdown, or provide your own by supplying templates_path key in your _pkgdown.yml. Generally, you'll find it easiest to customise if you start with a copy of the pkgdown templates and modify from there.


CenterForAssessment/packagePages documentation built on May 31, 2022, 1:56 p.m.