Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update customise.Rmd to advice for search on the right. #2710

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

olivroy
Copy link
Collaborator

@olivroy olivroy commented Jul 10, 2024

I noticed that users who specify right have lost their search as part of pkgdown 2.1.0. So, I thought it'd be good to update the suggestion for template

Copy link

github-actions bot commented Jul 10, 2024

@@ -333,7 +333,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]
Copy link
Member

@hadley hadley Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd also need to add lightswitch here, if you're using the light switch. Not sure if you want to mention that or not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! better to mention it as specifying right has the "power" to make you loose search and lightswitch if not added explicitly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth adding a sentence to that effect? Something like: The downside of customising that navbar in this way is that you have to specify the other components that are specified by default, and if pkgdown later changes the defaults, you'll have to update you _pkgdown.yml.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the note elsewhere. Let me know what you think

vignettes/customise.Rmd Outdated Show resolved Hide resolved
vignettes/customise.Rmd Outdated Show resolved Hide resolved
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
@olivroy olivroy merged commit 1407329 into main Jul 11, 2024
14 checks passed
@olivroy olivroy deleted the search branch July 11, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants