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

Improve linked "announcements" #154

Open
ptheywood opened this issue Oct 3, 2022 · 0 comments
Open

Improve linked "announcements" #154

ptheywood opened this issue Oct 3, 2022 · 0 comments
Labels

Comments

@ptheywood
Copy link
Member

ptheywood commented Oct 3, 2022

The banner announcments previously used to link to the RHEL upgrade information are not a native part of sphinx, nor extension, instead provided by the theme.

The content is configured via the html_theme_options portion of conf.py, however, as this is pre-sphinx cross-references cannot be used, making linking to specific pages more awkward than it should be.

Custom javascript is used to add the link, in _static/js/custom.js, which finds and replaces the link content by looking up specific anchors in the navigation. This works OK for top level pages, but is far from ideal.

It is also a little painful to iteratively test/modify, due to sphinx's handling of _static files, and browser caching.

It's probably non-trivial to add RST cross ref support to the annoucnment directly, but it should atleast be possible to move the configuration to conf.py as a variable, and which is then used to generate the required javascript to avoid mutating multiple files.

@ptheywood ptheywood added the theme label Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant