readthedocs / sphinx-notfound-page

Create a custom 404 page with absolute URLs hardcoded
https://sphinx-notfound-page.readthedocs.io/
MIT License
48 stars 32 forks source link

Read the Docs: handle special URLs #200

Closed humitos closed 2 years ago

humitos commented 2 years ago

Read the Docs serves their static files under special URLs starting with /_/ that should not be modified by this extension. Otherwise, the flyout and other integrations are broken.

This commit checks if the documentation is building on Read the Docs and if the URLs starts with /_/ and skip the manipulation in that case.

404 page showing the flyout properly: https://sphinx-notfound-page--200.org.readthedocs.build/en/200/notfound