-
Notifications
You must be signed in to change notification settings - Fork 321
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
Allow topics from other packages in reference index #1664
Conversation
Notes: simplify, no need to rebuild topics. |
R/topics.R
Outdated
db <- tools::Rd_db(names[1]) | ||
Rd <- db[[rd_name]] | ||
# adapted from printr | ||
# https://github.com/yihui/printr/blob/0267c36f49e92bd99e5434f695f80b417d14e090/R/help.R#L69 | ||
sections <- sub('^\\\\', '', unlist(lapply(Rd, attr, 'Rd_tag'))) | ||
title <- as.character(Rd[sections == "title"][[1]]) |
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.
Pull this out into a separate named function just to clarify the purpose.
@yihui can you please confirm that it's ok for us to use your GPL licensed code in our MIT licensed package?
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.
Yes.
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.
Thank you!
However I am now extremely embarrassed to have at last remembered where else code for parsing Rd files lives... in pkgdown itself! 🤦♀️ 🙈
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.
Still using a bit of printr logic though, for finding the Rd.
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
NEWS.md
Outdated
@@ -1,5 +1,9 @@ | |||
# pkgdown (development version) | |||
|
|||
* `build_reference()` now allows linking to topics from other packages (either function names e.g. `rlang::is_installed` or topic names e.g. `sass::font_face`). (#1664) | |||
|
|||
* New template option `trailing_slash_redirect` that allows adding a script to redirect `your-package-url.com` to `your-package-url.com/`. (#1439, @cderv, @apreshill) |
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.
Is this supposed to be in here?
Fix #1251
Fix #1351