Skip to content

Commit 1407329

Browse files
olivroyhadley
andauthored
Update customise.Rmd to advice for search on the right + note about pkgdown changing default navbar (#2710)
--------- Co-authored-by: Hadley Wickham <[email protected]>
1 parent f20a649 commit 1407329

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vignettes/customise.Rmd

+3-1
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ It makes use of the the following built-in components:
282282
- `github`, a link to the source repository (with an icon), if it can be automatically determined from the `DESCRIPTION`.
283283
- `lightswitch`, a ["light switch"](#light-switch) to select light mode, dark mode, or auto mode.
284284

285+
Note that customising `navbar` like this comes with a downside: if pkgdown later changes the defaults, you'll have to update your `_pkgdown.yml`.
286+
285287
[^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
286288
package `foo.bar` the intro needs to be named `foo-bar.Rmd`.
287289

@@ -333,7 +335,7 @@ For example, the following yaml adds a new "twitter" component that appears to t
333335
``` yaml
334336
navbar:
335337
structure:
336-
right: [twitter, github]
338+
right: [search, twitter, github, lightswitch]
337339
components:
338340
twitter:
339341
icon: fa-twitter

0 commit comments

Comments
 (0)