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

define the topic names differently? #1577

Closed
wants to merge 2 commits into from
Closed

define the topic names differently? #1577

wants to merge 2 commits into from

Conversation

maelle
Copy link
Collaborator

@maelle maelle commented Mar 17, 2021

No description provided.

@maelle maelle mentioned this pull request Mar 17, 2021
R/package.r Outdated
@@ -133,7 +133,7 @@ package_topics <- function(path = ".", package = "pkgdown") {
funs <- purrr::map(rd, topic_funs)

tibble::tibble(
name = names,
name = fs::path_ext_remove(file_out),
Copy link
Member

Choose a reason for hiding this comment

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

I meant rather than changing this field, you should be changing the code that uses name to instead use file_out. Or is this data structure just passed to downlit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

topics goes to pkg via

topics = package_topics(pkg, package),

what's passed to downlit is
topic_index <- invert_index(set_names(pkg$topics$alias, pkg$topics$name))
, I could change that instead 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is what the next commit does but it does not work, actually. (testing on usethis locally)

@@ -10,7 +10,7 @@ section_init <- function(pkg, depth, override = list(), .frame = parent.frame())

local_options_link <- function(pkg, depth, .frame = parent.frame()) {
article_index <- set_names(path_file(pkg$vignettes$file_out), pkg$vignettes$name)
topic_index <- invert_index(set_names(pkg$topics$alias, pkg$topics$name))
topic_index <- invert_index(set_names(pkg$topics$alias, fs::path_ext_remove(pkg$topics$file_out)))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not enough

@maelle
Copy link
Collaborator Author

maelle commented Mar 26, 2021

Closing in favour of #1586.

@maelle maelle closed this Mar 26, 2021
@hadley hadley deleted the rd-bug branch October 19, 2021 12:00
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.

None yet

2 participants