diff --git a/vignettes/customise.Rmd b/vignettes/customise.Rmd index 17cd25828..92e4628a3 100644 --- a/vignettes/customise.Rmd +++ b/vignettes/customise.Rmd @@ -45,7 +45,7 @@ The following sections show you how. Please note that pkgdown's default theme has been carefully optimised to be accessible, so if you make changes, make sure that to also read `vignette("accessibility")` to learn about potential accessibility pitfalls. -### Light switch +### Light switch {#light-switch} You can provide a "light switch" to allow your uses to switch between dark and light themes by setting the `light-switch` template option to true: @@ -257,10 +257,10 @@ This is the default structure: navbar: structure: left: [intro, reference, articles, tutorials, news] - right: [search, github] + right: [search, github, lightswitch] ``` -It makes use of the the six built-in components: +It makes use of the the following built-in components: - `intro`: "Get Started", which links to a vignette or article with the same name as the package[^dots]. - `reference`, if there are any `.Rd` files. @@ -269,6 +269,7 @@ It makes use of the the six built-in components: - `news`, if `NEWS.md` exists. - `search`, the search box (see `?build_search` for more details). - `github`, a link to the source repository (with an icon), if it can be automatically determined from the `DESCRIPTION`. +- `lightswitch`, a ["light switch"](#light-switch) to select light mode, dark mode, or auto mode. [^dots]: Note that dots (`.`) in the package name need to be replaced by hyphens (`-`) in the vignette filename to be recognized as the intro. That means for a package `foo.bar` the intro needs to be named `foo-bar.Rmd`.