Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Overwrite links of previous and next buttons for a single page #921

Open
mondeja opened this issue May 9, 2020 · 4 comments
Open

Overwrite links of previous and next buttons for a single page #921

mondeja opened this issue May 9, 2020 · 4 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@mondeja
Copy link
Contributor

mondeja commented May 9, 2020

Problem

Reading the documentation of Blender, in the building documentation with Linux page I've found that the next button link it's pointing to the building documentation page with MacOs. It would be cool an option to point to other page on previous and next buttons on a single page, so in this case the next button would point to edit manual blender documentation page and the Continue with the next step: Editing. last line could be consistent with Next button.

I'm not sure if this is out of reach of sphinx_rtd_theme scope or if there is an option there that could accomplish this. What are your thoughs about this?

@mondeja mondeja changed the title Overwrite link of previous and next buttons for a single page Overwrite links of previous and next buttons for a single page May 9, 2020
@ericholscher
Copy link
Member

ericholscher commented May 21, 2020

I think we could likely support this using page-level metadata: https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html?highlight=metadata#file-wide-metadata

We could adapt the link in this case to be something like:

{% if 'next_page' in metadata %} 
<a href={{ metadata['next_page'] }}">
{% else %}
<a href={{ next.link }}>
{% endif %}

@jdillard
Copy link

jdillard commented Sep 4, 2020

Well shoot, I just realized I got excited and didn't fully read the issue, you can ignore #994 for this issue, but it may serve as inspiration.

@jdillard
Copy link

jdillard commented Sep 4, 2020

Ok, I went ahead and took a shot at this since I was already in there: #995.

@Blendify
Copy link
Member

Hi, a reported this to sphinx sphinx-doc/sphinx#9024 hopefully it gets included in sphinx rather than hacking an implementation into the theme.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

5 participants