Skip to content

Conversation

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 23, 2023

For non-main documentation (e.g., mpl-third-party), we want the navbar to use absolute links (https://matplotlib.org/...) for local development, but when released on the website, it should use /stable/... links. This ensures that the navbar links are never broken.


def setup_html_page_context(app, pagename, templatename, context, doctree):
"""Add a mpl_path template function."""
# Pick link setting based on release mode.
Copy link
Member

Choose a reason for hiding this comment

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

Can this get more explanation? I'm not sure what is going on here and why...

Copy link
Member Author

@QuLogic QuLogic Mar 24, 2023

Choose a reason for hiding this comment

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

Sure, I've expanded on the comments.

For non-main documentation (e.g., `mpl-third-party`), we want the navbar
to use absolute links (`https://matplotlib.org/...`) for local
development, but when released on the website, it should use
`/stable/...` links.
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Thanks!

@jklymak jklymak merged commit 8857d2f into matplotlib:main Mar 24, 2023
@QuLogic QuLogic deleted the release-navbar branch March 24, 2023 22:08
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.

2 participants