pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.59k stars 301 forks source link

Enable injecting version warning banners (mirroring/above-and-beyond what RtD supports) #803

Open pradyunsg opened 1 month ago

pradyunsg commented 1 month ago

What's happening?

https://github.com/pallets/pallets-sphinx-themes/ has custom JS logic for injecting a version warning banner on top, and the scrolling mechanisms understand how this banner works.

https://github.com/pallets/pallets-sphinx-themes/blob/465f69bda3b4183d99a38b7354de569ff2c79bcb/src/pallets_sphinx_themes/themes/pocoo/static/version_warning_offset.js

It would be possible for pallets-sphinx-themes to be replaced with Furo, to enable those projects to move over. This banner would be supported with something similar to https://github.com/readthedocs/readthedocs.org//issues/9875#issuecomment-1647905630 which reads the information in a manner specific to how various pallets projects handle data injection.

Reproducer

Skipping this for now. Look at the implementation for this and, later, try switching over Flask out of these setups.

Expectation

Skipping this for now. Make this feasible.

Code of Conduct