Skip to content

Hosting: support repository links when using html_additional_pages #9854

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

Closed
jdknight opened this issue Jan 2, 2023 · 1 comment
Closed
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@jdknight
Copy link

jdknight commented Jan 2, 2023

Details

Expected Result

For all generated pages, the RTD injected versions may have an associated source view/edit links to the respective source repository (e.g. view/edit links to GitHub):

image

These links should always be pointing to the respective source files for the rendered document.

Actual Result

If pages are published using the html_additional_pages option, these links may not be generated correctly. For example, with a configuration such as:

html_additional_pages = {
    'index': 'index.html',
}

And a project using, for example, GitHub should have the index page resolve to a path such as:

<project>/blob/main/doc/index.html

However, the existing link generates a link to:

<project>/blob/main/doc/index.rst

Not that experienced with RTD's implementation, but this may be as simple as:

  • Adjusting the configuration scrape logic to capture the html_additional_pages value.
  • Adjusting BaseFooterHTML._get_context so that when page_slug maps to an entry in html_additional_pages, page_slug is swapped to the value in the dictionary and source_suffix is cleared.
@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Jan 3, 2023
@humitos humitos changed the title support repository links when using html_additional_pages Hosting: support repository links when using html_additional_pages Jan 31, 2023
@humitos
Copy link
Member

humitos commented Jul 24, 2023

I'm going to close this issue since we won't integrate the flyout with specific Sphinx things. We are trying to make all our new features to be agnostic of the doctool used.

However, the new flyout we are creating in https://github.com/readthedocs/addons will eventually be customizable and people will be able to re-design it as they want.

@humitos humitos closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

2 participants