readthedocs / sphinx_rtd_theme

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

Debug: trigger Read the Docs Addons event to test/debug locally #1606

Closed humitos closed 2 months ago

humitos commented 2 months ago

Use a mocked JSON to trigger the event that Read the Docs Addons triggers when serving docs on production.

You can build the docs via:

sphinx-autobuild -E docs docs/_build/html

and then open http://127.0.0.1:8000 locally to see it in action.

Closes #1605

agjohnson commented 2 months ago

Are you not using npm run dev? There shouldn't be any manual commands necessary for development like that. The changes here look like they'll be usable either way, npm run dev doesn't do anything special during the Sphinx build.

humitos commented 2 months ago

Are you not using npm run dev?

Interesting. I was not using this. I just tested it and it works great 💯