-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the Sphinx notfound page extension #15669
base: devel
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
I've added this to a project from my fork: https://oranod-awx.readthedocs.io/en/latest/ You can request a fake page name like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing https://oranod-awx.readthedocs.io/en/latest/ and https://oranod-awx.readthedocs.io/en/latest/foo.html:
- <title>Ansible AWX Documentation — Ansible AWX community documentation</title>
+ <title>Oh no! — Ansible AWX community documentation</title>
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <link rel="stylesheet" href="/en/latest/_CascadingStyleSheet('_static/pygments.css', priority=200, rel='stylesheet', type='text/css')" type="text/css" />
- <link rel="stylesheet" href="_static/css/ansible.css" type="text/css" />
+ <link rel="stylesheet" href="/en/latest/_CascadingStyleSheet('_static/css/ansible.css', priority=200, rel='stylesheet', type='text/css')" type="text/css" />
- <link rel="stylesheet" href="_static/css/rtd-ethical-ads.css" type="text/css" />
+ <link rel="stylesheet" href="/en/latest/_CascadingStyleSheet('_static/css/rtd-ethical-ads.css', priority=500, rel='stylesheet', type='text/css')" type="text/css" />
- <link rel="shortcut icon" href="_static/images/Ansible-Mark-RGB_Black.png"/>
+ <link rel="shortcut icon" href="/en/latest/_static/images/Ansible-Mark-RGB_Black.png"/>
<!--[if lt IE 9]>
- <script src="_static/js/html5shiv.min.js"></script>
+ <script src="/en/latest/_static/js/html5shiv.min.js"></script>
<![endif]-->
- <script src="_static/jquery.js?v=5d32c60e"></script>
+ <script src="/en/latest/_static/jquery.js?v=5d32c60e"></script>
- <script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
+ <script src="/en/latest/_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
- <script src="_static/documentation_options.js?v=a9b6e813"></script>
+ <script src="/en/latest/_static/documentation_options.js?v=a9b6e813"></script>
- <script src="_static/doctools.js?v=888ff710"></script>
+ <script src="/en/latest/_static/doctools.js?v=888ff710"></script>
- <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+ <script src="/en/latest/_static/sphinx_highlight.js?v=dc90522c"></script>
- <script src="_static/js/theme.js"></script>
+ <script src="/en/latest/_static/js/theme.js"></script>
I'm not sure why _CascadingStyleSheet()
is leaking into the rendered HTML output. I think I saw this before, but never looked deep. The theme demo seems to be fine: https://sphinx-ansible-theme.readthedocs.io/en/latest/foo.html.
I think there's some incompatibility between versions of CPython, Sphinx and the underlying sphinx-rtd-theme
. Somebody will probably have to bisect it.
readthedocs/sphinx-notfound-page#224 mentions the same problem and ansible/ansible-documentation#678 links ansible/ansible-documentation@9d4c6db that suggests that changing what settings are used might be the fix: https://github.com/ansible/ansible-documentation/pull/827/files#diff-de16707d76a94c258b2d4ba2b8f95910db018b923e2b4834dacf47c8964b2a90R340.
@@ -1,5 +1,5 @@ | |||
# | |||
# This file is autogenerated by pip-compile with Python 3.11 | |||
# This file is autogenerated by pip-compile with Python 3.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oraNod you must always use the same environment to update constraints files. The AWX folks do this in their container for consistency. Plus, the updater script won't generate path changes back and forth in the comment lines below.
SUMMARY
Add https://sphinx-notfound-page.readthedocs.io/en/latest/installation.html
This is an attempt to fix the 404 page issues on read the docs.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
n/a
ADDITIONAL INFORMATION
follows up on #15668