<\/div>. Within first paragraph, contains image-containing links. Identified badges removed main content. shown sidebar depending development mode sidebar customization, see sidebar section.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_home.html","id":"authors","dir":"Reference","previous_headings":"","what":"Authors","title":"Build home section — build_home","text":"default, pkgdown display author information three places: sidebar, left part side footer, author page. documentation describes customise overall author display. See ?build_home ?build_site details changing location authors information within home sidebar site footer.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_home.html","id":"authors-orcid-and-bio","dir":"Reference","previous_headings":"","what":"Authors ORCID and bio","title":"Build home section — build_home","text":"Author ORCID identification numbers DESCRIPTION linked using ORCID logo: want add details authors involvement package, can use comment field, rendered authors page.","code":"Authors@R: c( person(\"Hadley\", \"Wickham\", , \"hadley@rstudio.com\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0003-4757-117X\") ), person(\"Jay\", \"Hesselberth\", role = \"aut\", comment = c(ORCID = \"0000-0002-6299-179X\") ) ) Authors@R: c( person(\"Hadley\", \"Wickham\", , \"hadley@rstudio.com\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0003-4757-117X\", \"Indenter-in-chief\") ), person(\"Jay\", \"Hesselberth\", role = \"aut\", comment = c(ORCID = \"0000-0002-6299-179X\") ) )"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_home.html","id":"additional-control-via-yaml","dir":"Reference","previous_headings":"","what":"Additional control via YAML","title":"Build home section — build_home","text":"can control additinal aspects authors display via authors YAML field: display author footer, sidebar authors page, authors (role) displayed sidebar footer, text authors footer, text authors sidebar, text authors authors page. can modify author's name displayed adding subsection authors. entry authors named author's name (matching DESCRIPTION) can contain href /html fields: href provided, author's name linked URL. html provided, shown instead author's name. particularly useful want display logo corporate sponsor. Use absolute URL image, relative link. Use empty alternative text rather alternative text screen-reader skip . default, \"developers\" list shown sidebar footer populated maintainer (\"cre\"), authors (\"aut\"), funder (\"fnd\") DESCRIPTION. choose roles filtering. configuration : maintainer funder(s) appear footer, text \"Crafted \", authors contributors appear sidebar, authors list sidebar preceded followed text, authors list authors page preceded followed text. want filter authors based something else roles, consider using custom sidebar/footer component (see ?build_home/?build_site, respectively).","code":"authors: firstname lastname: href: \"http://name-website.com\" html: \"

\" authors: footer: roles: [cre, fnd] text: \"Crafted by\" sidebar: roles: [aut, ctb] before: \"So *who* does the work?\" after: \"Thanks all!\" before: \"This package is proudly brought to you by:\" after: \"See the [changelog](news/index.html) for other contributors. :pray:\""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_home.html","id":"sidebar","dir":"Reference","previous_headings":"","what":"Sidebar","title":"Build home section — build_home","text":"can customise homepage sidebar home.sidebar field. made two pieces: structure, defines overall layout, components, defines piece looks like. organisation makes easy mix match pkgdown defaults customisations. default structure: drawn seven built-components: links: automated links generated URL BugReports fields DESCRIPTION plus manual links home.links field: license: Licensing information LICENSE/LICENCE LICENSE.md/LICENCE.md files present. community: links .github/CONTRIBUTING.md, .github/CODE_OF_CONDUCT.md, etc. citation: link package citation information. Uses either inst/CITATION , absent, information DESCRIPTION. authors: selected authors DESCRIPTION. dev: development status badges extracted README.md/index.md. shown \"development\" versions websites; see \"Development mode\" ?build_site details. toc: table contents README (shown default). can also add components, text markdown text: Alternatively, can provide ready-made sidebar HTML: completely remove :","code":"home: sidebar: structure: [links, license, community, citation, authors, dev] home: links: - text: Link text href: https://website.com - text: Roadmap href: /roadmap.html home: sidebar: structure: [authors, custom, toc, dev] components: custom: title: Funding text: We are *grateful* for funding! home: sidebar: html: path-to-sidebar.html home: sidebar: FALSE"},{"path":[]},{"path":"https://pkgdown.r-lib.org/dev/reference/build_news.html","id":null,"dir":"Reference","previous_headings":"","what":"Build news section — build_news","title":"Build news section — build_news","text":"NEWS.md broken versions using level one (#) level two headings (##) (partially) match one following forms (ignoring case): {package name} 1.3.0 {package name} v1.3.0 Version 1.3.0 Changes 1.3.0 Changes v1.3.0","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_news.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build news section — build_news","text":"","code":"build_news(pkg = \".\", override = list(), preview = FALSE)"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_news.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build news section — build_news","text":"pkg Path package. override optional named list used temporarily override values _pkgdown.yml preview TRUE, .na(preview) && interactive(), preview freshly generated section browser.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_news.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Build news section — build_news","text":"common structure news files use top level heading release, use second level heading break individual bullets sections. Issues contributors automatically linked corresponding pages GitHub GitHub repo can discovered DESCRIPTION (typically URL entry containing github.com) version available CRAN, release date automatically added heading (see suppress); available CRAN, \"Unreleased\" added.","code":"# foofy 1.0.0 ## Major changes * Can now work with all grooveable grobbles! ## Minor improvements and bug fixes * Printing scrobbles no longer errors (@githubusername, #100) * Wibbles are now 55% less jibbly (#200)"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_news.html","id":"yaml-config","dir":"Reference","previous_headings":"","what":"YAML config","title":"Build news section — build_news","text":"automatically link release announcements, include releases section. Control whether news present one page multiple pages one_page field. default true. Suppress default addition CRAN release dates :","code":"news: releases: - text: \"usethis 1.3.0\" href: https://www.tidyverse.org/articles/2018/02/usethis-1-3-0/ - text: \"usethis 1.0.0 (and 1.1.0)\" href: https://www.tidyverse.org/articles/2017/11/usethis-1.0.0/ news: one_page: false news: cran_dates: false"},{"path":[]},{"path":"https://pkgdown.r-lib.org/dev/reference/build_redirects.html","id":null,"dir":"Reference","previous_headings":"","what":"Build redirects — build_redirects","title":"Build redirects — build_redirects","text":"change structure documentation (renaming vignettes help topics) can setup redirects old content new content. One several now-absent pages can redirected new page (new section new page). works creating html page performs \"meta refresh\", best way redirect works everywhere might deploy site. syntax following, old paths left, new paths URLs right. reason choose redirect existing page make sure exclude search index, see ?build_search.","code":"redirects: - [\"articles/old-vignette-name.html\", \"articles/new-vignette-name.html\"] - [\"articles/another-old-vignette-name.html\", \"articles/new-vignette-name.html\"] - [\"articles/yet-another-old-vignette-name.html\", \"https://pkgdown.r-lib.org/dev\"]"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_redirects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build redirects — build_redirects","text":"","code":"build_redirects(pkg = \".\", override = list())"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_redirects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build redirects — build_redirects","text":"pkg Path package. override optional named list used temporarily override values _pkgdown.yml","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":null,"dir":"Reference","previous_headings":"","what":"Build reference section — build_reference","title":"Build reference section — build_reference","text":"default, pkgdown generate index lists functions alphabetical order. override , provide reference section _pkgdown.yml described .","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build reference section — build_reference","text":"","code":"build_reference( pkg = \".\", lazy = TRUE, examples = TRUE, run_dont_run = FALSE, seed = 1014L, override = list(), preview = FALSE, devel = TRUE, topics = NULL ) build_reference_index(pkg = \".\", override = list())"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build reference section — build_reference","text":"pkg Path package. lazy TRUE, rebuild pages .Rd recent .html. makes much easier rapidly prototype. set FALSE build_site(). examples Run examples? run_dont_run Run examples surrounded \\dontrun? seed Seed used initialize random number generation order make article output reproducible. integer scalar NULL seed. override optional named list used temporarily override values _pkgdown.yml preview TRUE, .na(preview) && interactive(), preview freshly generated section browser. devel Determines code loaded order run examples. TRUE (default), assumes live development environment, loads source package pkgload::load_all(). FALSE, uses installed version package. topics Build specified topics. supplied, sets lazy preview FALSE.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"reference-index","dir":"Reference","previous_headings":"","what":"Reference index","title":"Build reference section — build_reference","text":"tweak index page, add section called reference _pkgdown.yml. can contain three different types element: title (title + desc), generates row containing
optional paragraph description. subtitle (subtitle + desc), generates row containing optional paragraph description. list topics (contents), generates one row topic, list aliases topic left, topic title right. (historical reasons can include contents title subtitle, longer recommended). packages need use title contents components. example, snippet YAML pkgdown uses generate reference index: Bigger packages, e.g. ggplot2, may need additional layer structure order clearly organise large number functions: desc can use markdown, long description good idea take advantage YAML > notation:","code":"reference: - title: Build desc: Build a complete site or its individual section components. - contents: - starts_with(\"build_\") - title: Templates - contents: - template_navbar - render_page reference: - title: Layers - subtitle: Geoms desc: Geom is short for geometric element - contents: - starts_with(\"geom\") - subtitle: Stats desc: Statistical transformations transform data before display. contents: - starts_with(\"stat\") desc: > This is a very _long_ and **overly** flowery description of a single simple function. By using `>`, it's easy to write a description that runs over multiple lines."},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"topic-matching","dir":"Reference","previous_headings":"","what":"Topic matching","title":"Build reference section — build_reference","text":"contents can contain: Individual function/topic names. Weirdly named functions doubled quoting, YAML R, e.g. \"`+.gg`\". starts_with(\"prefix\") select functions common prefix. ends_with(\"suffix\") select functions common suffix. matches(\"regexp\") complex regular expressions. has_keyword(\"x\") select topics keyword \"x\"; has_keyword(\"datasets\") selects data documentation. has_concept(\"blah\") select topics concept \"blah\". using roxygen2, has_concept() also matches family tags, roxygen2 converts concept tags. lacks_concepts(c(\"concept1\", \"concept2\")) select topics without concepts. useful capture topics otherwise captured has_concepts(). Topics installed packages, e.g. rlang::is_installed() (function name) sass::font_face (topic name). has_lifecycle(\"deprecated\") select topics lifecycle deprecated. functions (except has_keyword()) automatically exclude internal topics (.e. \\keyword{internal}). can choose include (e.g.) starts_with(\"build_\", internal = TRUE). Use leading - remove topics section, e.g. -topic_name, -starts_with(\"foo\"). pkgdown check non-internal topics included reference index page, error missed .","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"missing-topics","dir":"Reference","previous_headings":"","what":"Missing topics","title":"Build reference section — build_reference","text":"pkgdown warn (non-internal) topics listed reference index. can suppress warnings listing topics section \"title: internal\" (case sensitive) displayed reference index.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"icons","dir":"Reference","previous_headings":"","what":"Icons","title":"Build reference section — build_reference","text":"can optionally supply icon help topic. , need top-level icons directory. contain .png files either 30x30 (regular display) 60x60 (want retina display). Icons matched topics aliases.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Build reference section — build_reference","text":"need run extra code examples run, can create pkgdown/pre-reference.R pkgdown/post-reference.R.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_reference.html","id":"figures","dir":"Reference","previous_headings":"","what":"Figures","title":"Build reference section — build_reference","text":"can control default rendering figures specifying figures field _pkgdown.yml. default settings equivalent : parameters interpreted similarly knitr chunk options. .parameters list parameters available custom graphics output devices HTML widgets.","code":"figures: dev: ragg::agg_png dpi: 96 dev.args: [] fig.ext: png fig.width: 7.2916667 fig.height: ~ fig.retina: 2 fig.asp: 1.618 bg: NA other.parameters: []"},{"path":[]},{"path":"https://pkgdown.r-lib.org/dev/reference/build_search.html","id":null,"dir":"Reference","previous_headings":"","what":"Build search index — build_search","title":"Build search index — build_search","text":"Generate JSON search index built site. used fuse.js provide javascript powered search BS5 powered pkgdown sites. NB: build_search() called automatically build_site(); need call . page documents works customisation options.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_search.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build search index — build_search","text":"","code":"build_search(pkg = \".\", override = list())"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_search.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build search index — build_search","text":"pkg Path package. override optional named list used temporarily override values _pkgdown.yml","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_search.html","id":"yaml-config","dir":"Reference","previous_headings":"","what":"YAML config","title":"Build search index — build_search","text":"can exclude paths search index using search.exclude. exclude changelog search index:","code":"search: exclude: ['news/index.html']"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_search.html","id":"debugging-and-local-testing","dir":"Reference","previous_headings":"","what":"Debugging and local testing","title":"Build search index — build_search","text":"Locally (opposed GitHub Pages Netlify instance), search work simply use pkgdown preview static files. can use servr::httw(\"docs\") instead. search working, run pkgdown::pkgdown_sitrep() eliminate common issues absence URL pkgdown configuration file package.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":null,"dir":"Reference","previous_headings":"","what":"Build a complete pkgdown website — build_site","title":"Build a complete pkgdown website — build_site","text":"build_site() convenient wrapper around six functions: init_site() build_home() build_reference() build_articles() build_tutorials() build_news() build_redirects() See documentation function learn control aspect site. page documents options affect whole site.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build a complete pkgdown website — build_site","text":"","code":"build_site( pkg = \".\", examples = TRUE, run_dont_run = FALSE, seed = 1014L, lazy = FALSE, override = list(), preview = NA, devel = FALSE, new_process = !devel, install = !devel )"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build a complete pkgdown website — build_site","text":"pkg Path package. examples Run examples? run_dont_run Run examples surrounded \\dontrun? seed Seed used initialize random number generation order make article output reproducible. integer scalar NULL seed. lazy TRUE, rebuild articles reference pages source newer destination. override optional named list used temporarily override values _pkgdown.yml preview TRUE, .na(preview) && interactive(), preview freshly generated section browser. devel Use development deployment process? TRUE, uses lighter-weight process suitable rapid iteration; run examples vignettes current process, load code pkgload::load_all(). FALSE, first install package temporary library, run examples vignettes new process. build_site() defaults devel = FALSE get high fidelity outputs building complete site; build_reference(), build_home() friends default devel = TRUE can rapidly iterate development. new_process TRUE, run build_site() separate process. enhances reproducibility ensuring nothing loaded current process affects build process. install TRUE, install package temporary library available vignettes.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"general-config","dir":"Reference","previous_headings":"","what":"General config","title":"Build a complete pkgdown website — build_site","text":"destination controls site generated, defaulting docs/. Paths relative package root. url optional, strongly recommended. specifies site published used allow pkgdown sites link site needed (vignette(\"linking\")), generate sitemap.xml, automatically generate CNAME deploying github, generate metadata needed rich social \"media cards\" (vignette(\"metadata\")), . title overrides default site title, package name. used page title default navbar.","code":"url: https://pkgdown.r-lib.org"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"navbar-and-footer","dir":"Reference","previous_headings":"","what":"Navbar and footer","title":"Build a complete pkgdown website — build_site","text":"navbar footer fields control appearance navbar footer appear every page. Learn fields vignette(\"customise\").","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"development-mode","dir":"Reference","previous_headings":"","what":"Development mode","title":"Build a complete pkgdown website — build_site","text":"development field allows generate different sites development released versions package. use , first need set development mode:","code":"development: mode: auto"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"setting-development-mode","dir":"Reference","previous_headings":"","what":"Setting development mode","title":"Build a complete pkgdown website — build_site","text":"development mode site controls built site placed styled (.e. colour package version navbar, version tooltip), whether site indexed search engines. four possible modes: automatic (mode: auto): determines mode based version: 0.0.0.9000 (0.0.0.*): unreleased. four version components: development. everything else -> release. release (mode: release), default. Site written docs/ styled like released package, even content unreleased development version. Version navbar gets default colouring. Development badges shown sidebar (see ?build_home). development (mode: devel). Site written docs/dev/. navbar version gets \"danger\" class tooltip stating docs -development version package. noindex meta tag used ensure packages indexed search engines. Development badges shown sidebar (see ?build_home). unreleased (mode: unreleased). Site written docs/. Version navbar gets \"danger\" class, message indicating package yet CRAN. Development badges shown sidebar (see ?build_home). Use mode: auto want released dev site, mode: release just want single site. rare need either devel unreleased modes. can override mode specified _pkgdown.yml setting setting PKGDOWN_DEV_MODE devel release.","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"selective-html","dir":"Reference","previous_headings":"","what":"Selective HTML","title":"Build a complete pkgdown website — build_site","text":"can selectively show HTML devel release site adding class pkgdown-devel pkgdown-release. easily accessed .Rmd files can use pandoc's
syntax control block markdown display. example, can use following markdown README show GitHub install instructions development version site: can use similar technique control badges displayed. markdown show CRAN status badge site released package GitHub check status development package:","code":"::: {.pkgdown-devel} You can install the development version of pkgdown from GitHub with: `remotes::install_github(\"r-lib/pkgdown\")` ::: [] (https://cran.r-project.org/package=pkgdown){.pkgdown-release} [] (https://github.com/r-lib/pkgdown/actions){.pkgdown-devel}"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"other-options","dir":"Reference","previous_headings":"","what":"Other options","title":"Build a complete pkgdown website — build_site","text":"three options can control: destination allows override default subdirectory used development site; defaults dev/. version_label allows override style used development (unreleased) versions package. defaults \"danger\", can set \"default\", \"info\", \"warning\" instead. (precise colours determined bootstrap theme, become progressively eye catching go default danger). Finally, can choose override default tooltip version_tooltip.","code":"development: destination: dev version_label: danger version_tooltip: \"Custom message here\""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"template","dir":"Reference","previous_headings":"","what":"Template","title":"Build a complete pkgdown website — build_site","text":"template field mostly used control appearance site. See vignette(\"customise\") details. also used control","code":""},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"other-aspects","dir":"Reference","previous_headings":"","what":"Other aspects","title":"Build a complete pkgdown website — build_site","text":"template fields control aspects site: noindex: true suppress indexing pages search engines: google_site_verification allows verify site google: trailing_slash_redirect: true automatically redirect -package-url.com -package-url.com/, using JS script added home page. useful certain redirect scenarios.","code":"template: params: noindex: true template: params: google_site_verification: _nn6ile-a6x6lctOW template: trailing_slash_redirect: true"},{"path":"https://pkgdown.r-lib.org/dev/reference/build_site.html","id":"analytics","dir":"Reference","previous_headings":"","what":"Analytics","title":"Build a complete pkgdown website — build_site","text":"capture usage site web analytics tool, can make use includes field add special HTML need. HTML typically placed in_header (actually ), before_body, after_body. can learn includes work pkgdown https://pkgdown.r-lib.org/articles/customise.html#additional-html--files. include examples popular analytics platforms , recommend getting HTML directly tool: plausible.io: Google analytics: GoatCounter:","code":"template: includes: in_header: |