N8-CIR-Bede / documentation

Documentation for the N8CIR Bede Tier 2 HPC faciltiy
https://bede-documentation.readthedocs.io/en/latest/
7 stars 11 forks source link

Improve linked "announcements" #154

Open ptheywood opened 2 years ago

ptheywood commented 2 years ago

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.