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

Topic named after objects in Usage section rather than specified topic name #1624

Closed
lionel- opened this issue Apr 12, 2021 · 3 comments · Fixed by #2160
Closed

Topic named after objects in Usage section rather than specified topic name #1624

lionel- opened this issue Apr 12, 2021 · 3 comments · Fixed by #2160
Milestone

Comments

@lionel-
Copy link
Member

lionel- commented Apr 12, 2021

From r-lib/rlang#959.

The topic was defined as @name bang-bang but pkgdown included it in the reference index under the name qq_show. When I removed qq_show() from the Usage section, it got indexed under its intended name.

@maelle
Copy link
Collaborator

maelle commented May 7, 2021

This comes from the lines

aliases = purrr::map2(
topics$funs,
topics$name,
~ if (length(.x) > 0) .x else .y
),

I can't think of a good solution that'd work automatically. Workarounds currently would be to make sure the Rd title contains the important keywords.

@hadley
Copy link
Member

hadley commented Sep 23, 2021

I'm not sure if we can fix this (or if it's worth the effort to figure out how to fix it). We already have a fairly sophisticated set of heuristics to figure out what to display because generally the usage gives the user the most informative targets for clicking — it's only in relatively few cases where you actually want to see the topic name or raw aliases.

@hadley
Copy link
Member

hadley commented Jul 12, 2022

Maybe if there's no funs we should use all the aliases? I think that will affect little existing documentation, but open the door to creative use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants