readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.8k stars 1.74k forks source link

Read `READTHEDOCS_PROJECT` from environment variables #1578

Closed humitos closed 3 months ago

humitos commented 3 months ago

This line doesn't work because Read the Docs pass READTHEDOCS_PROJECT as environment variable, which is not directly accessible from the HTML context:

https://github.com/readthedocs/sphinx_rtd_theme/blob/7b141ea90ac320bb926a6a8e14f930c9b56ca94e/sphinx_rtd_theme/static/js/versions.js_t#L105