Skip to content

Commit

Permalink
Update customise.Rmd to advice for search on the right + note about…
Browse files Browse the repository at this point in the history
… pkgdown changing default navbar (#2710)


---------

Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
  • Loading branch information
olivroy and hadley authored Jul 11, 2024
1 parent f20a649 commit 1407329
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vignettes/customise.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ It makes use of the the following built-in components:
- `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.

Note that customising `navbar` like this comes with a downside: if pkgdown later changes the defaults, you'll have to update your `_pkgdown.yml`.

[^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`.

Expand Down Expand Up @@ -333,7 +335,7 @@ For example, the following yaml adds a new "twitter" component that appears to t
``` yaml
navbar:
structure:
right: [twitter, github]
right: [search, twitter, github, lightswitch]
components:
twitter:
icon: fa-twitter
Expand Down

0 comments on commit 1407329

Please sign in to comment.