-
Notifications
You must be signed in to change notification settings - Fork 335
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
more sidebar customization #1488
Conversation
Regarding the question in the issue about images, I suppose "text" could contain an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also useful to write the NEW.md
bullet because that gives me the big picture view of goal of the PR.
R/build-home-index.R
Outdated
return(pkg$meta$home$sidebar) | ||
|
||
sidebar_path <- file.path(pkg$src_path, pkg$meta$home$sidebar$html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a pointer to a path, it should be html_path
or similar. I wonder if this should be in addition to the regular sidebar, rather than a replacement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure.
- If you want a really custom sidebar you'd provide your own HTML as sidebar.html field.
- If you want to add a custom section (H2 title, any HTML below that), you'd use the sidebar.structure and sidebar.components fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have evidence that folks want to replace the whole sidebar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no but this PR already provides a way to add custom component to the navbar.
@@ -74,15 +74,19 @@ read_desc <- function(path = ".") { | |||
|
|||
# Metadata ---------------------------------------------------------------- | |||
|
|||
read_meta <- function(path) { | |||
path <- path_first_existing( | |||
pkgdown_config_path <- function(path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in scope for this PR but with such a function one could easily have a helper file.edit(pkgdown_config_path("."))
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
The failures on macOS are due to the installation of textshaping, that has been released on CRAN yesterday. |
I had missed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of using markdown instead of html (especially since you can still use raw html in markdown). But lets finish up the style issues in this PR, merge it, and then use markdown instead of html.
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
Fix #1443
TODO