-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Set data-content_root for Sphinx ≥ 7.2 #1507
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This attribute is now required by searchtools.js: https://github.com/sphinx-doc/sphinx/blob/v7.2.2/sphinx/themes/basic/static/searchtools.js#L65 When it's not set, loading search results via AJAX will be broken because the JS code will attempt to load paths like /undefinedfoo.html.
agjohnson
approved these changes
Aug 29, 2023
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.
@humitos I'd be +1 on merging just this change for a 2.0rc1. This shouldn't change anything for projects using older releases of the theme.
This was referenced Dec 7, 2023
humitos
added a commit
that referenced
this pull request
Jan 3, 2024
* Remove Sphinx<5 compatibility Since 2.0 we do not support Sphinx<5. * Always use `writer-html5` Since 2.0 HTML4 writer is not supported. * Use `css_tag` helper to inject CSS files * Revert "Remove Sphinx<5 compatibility" Keep `sphinx_version_info`. It will be required. This reverts commit 3afbed2. * Set `data-content_root` for Sphinx >= 7.2 Copied from #1507 * Default value for `DISPLAY` and `--new-tab` * Visual test with Firefox and tox Allows developer to run ``` tox -e py310-sphinx72-firefox ``` This will run the tests and open a Firefox after building the demo site showing the `demo/demo.html` page on it. Then, you can also run: ``` tox -e py310-sphinx61-firefox ``` and compare the visual differences. Idea copied from #1388 Closes #1388 * Update sphinx_rtd_theme/layout.html Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com> * Remove code from merge conflict * Revert a mistake done on merging * Update CSS logic again * Minor refactor to undocumented `extra_css_files` option --------- Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
medmunds
added a commit
to anymail/django-anymail
that referenced
this pull request
Feb 29, 2024
Upgrade to sphinx-rtd-theme 2.0.x to fix broken links in search results (for searches rendered client side). See sphinx-doc/sphinx#11608 (comment) and readthedocs/sphinx_rtd_theme#1507
medmunds
added a commit
to anymail/django-anymail
that referenced
this pull request
Feb 29, 2024
Upgrade to sphinx-rtd-theme 2.0.x to fix broken links in search results (for searches rendered client side). See sphinx-doc/sphinx#11608 (comment) and readthedocs/sphinx_rtd_theme#1507
khancyr
pushed a commit
to ArduPilot/sphinx_rtd_theme
that referenced
this pull request
Jul 15, 2024
* 2.0 milestone: drop supported versions The new policy is: - Python >=3.6 - Sphinx >= 5 - HTML4 and HTML5 writer - docutils >= 0.14, < 0.19 * Update roadmap after discussion By the beginning of 2024 we should support newer Sphinx versions and HTML5 only. * Remove Python 2.7 from CircleCI * Run only supported versions on Python 3.11 * Update with feedback from review * Update documentation to match our support * Add Sphinx 6.2 that was missing * Update tox/circleci to work * Revert tox command * Drop support for HTML4 and keep `-qa` testing - drop support for HTML4 on 2.0 - keep `-qa` TOX environment to be able to compare feature branches - emit `logger.errors` on Python 2 and html_writer4=True - require Sphinx >= 5.0 - remove logic for old Sphinx versions * Update Tox and CircleCI * Update contributing page to match our plans --------- Co-authored-by: Anthony Johnson <aj@ohess.org> Release 2.0.0rc1 (readthedocs#1510) * Release 2.0.0rc1 * Update npm lock file Bump to next release 2.0.0rc2 (readthedocs#1511) Docs: Remove "git install" method from instructions (readthedocs#1375) * Remove instructions "encouraging" to install directly from git * Update changelog: Add reminder that people should not install directly from git * Update docs/changelog.rst --------- Co-authored-by: Manuel Kaufmann <humitos@gmail.com> Visual test with Firefox and tox (readthedocs#1513) * Visual test with Firefox and tox Allows developer to run ``` tox -e py310-sphinx72-firefox ``` This will run the tests and open a Firefox after building the demo site showing the `demo/demo.html` page on it. Then, you can also run: ``` tox -e py310-sphinx61-firefox ``` and compare the visual differences. Idea copied from readthedocs#1388 Closes readthedocs#1388 * Default value for `DISPLAY` and `--new-tab` * Simplify the idea :) Remove Python2 leftovers (readthedocs#1514) Docs: update Read the Docs config (readthedocs#1518) Use the latest config file style. Set data-content_root for Sphinx ≥ 7.2 (readthedocs#1507) This attribute is now required by searchtools.js: https://github.com/sphinx-doc/sphinx/blob/v7.2.2/sphinx/themes/basic/static/searchtools.js#L65 When it's not set, loading search results via AJAX will be broken because the JS code will attempt to load paths like /undefinedfoo.html. Co-authored-by: Manuel Kaufmann <humitos@gmail.com> Use `css_tag` helper to inject CSS files (readthedocs#1519) * Use `css_tag` helper to inject CSS files * Typo Add support for `docutils==0.20.x` (readthedocs#1517) Closes readthedocs#1516 Release 2.0rc2 (readthedocs#1520) Version bump for 2.0rc3 development (readthedocs#1521) Next development version is 2.0rc3 for now, but more likely 2.1rc1 Fix readthedocs#1522: fix `'str' object has no attribute 'attributes'` (readthedocs#1528) * Fix readthedocs#1522: fix attribute error if css is str * Revert "Fix readthedocs#1522: fix attribute error if css is str" This reverts commit b22a77f. * Use `css_tag` only for standard CSS files from Sphinx ... and keep using the custom `link` HTML tag for CSS files included via the HTML theme option `extra_css_files`. * Normalize template variables --------- Co-authored-by: Manuel Kaufmann <humitos@gmail.com> Co-authored-by: Anthony Johnson <aj@ohess.org> Release 2.0.0rc3 (readthedocs#1535) Increment for next potential release (readthedocs#1536) Fix AttributeError when one of `css_files` is a string (readthedocs#1537) Fix AttributeError when one of css_files is a string Release 2.0.0rc4 (readthedocs#1538) Bump for next potential release, 2.0.0rc5 (readthedocs#1539) Release 2.0 final (readthedocs#1544)
khancyr
pushed a commit
to ArduPilot/sphinx_rtd_theme
that referenced
this pull request
Sep 1, 2024
* 2.0 milestone: drop supported versions The new policy is: - Python >=3.6 - Sphinx >= 5 - HTML4 and HTML5 writer - docutils >= 0.14, < 0.19 * Update roadmap after discussion By the beginning of 2024 we should support newer Sphinx versions and HTML5 only. * Remove Python 2.7 from CircleCI * Run only supported versions on Python 3.11 * Update with feedback from review * Update documentation to match our support * Add Sphinx 6.2 that was missing * Update tox/circleci to work * Revert tox command * Drop support for HTML4 and keep `-qa` testing - drop support for HTML4 on 2.0 - keep `-qa` TOX environment to be able to compare feature branches - emit `logger.errors` on Python 2 and html_writer4=True - require Sphinx >= 5.0 - remove logic for old Sphinx versions * Update Tox and CircleCI * Update contributing page to match our plans --------- Co-authored-by: Anthony Johnson <aj@ohess.org> Release 2.0.0rc1 (readthedocs#1510) * Release 2.0.0rc1 * Update npm lock file Bump to next release 2.0.0rc2 (readthedocs#1511) Docs: Remove "git install" method from instructions (readthedocs#1375) * Remove instructions "encouraging" to install directly from git * Update changelog: Add reminder that people should not install directly from git * Update docs/changelog.rst --------- Co-authored-by: Manuel Kaufmann <humitos@gmail.com> Visual test with Firefox and tox (readthedocs#1513) * Visual test with Firefox and tox Allows developer to run ``` tox -e py310-sphinx72-firefox ``` This will run the tests and open a Firefox after building the demo site showing the `demo/demo.html` page on it. Then, you can also run: ``` tox -e py310-sphinx61-firefox ``` and compare the visual differences. Idea copied from readthedocs#1388 Closes readthedocs#1388 * Default value for `DISPLAY` and `--new-tab` * Simplify the idea :) Remove Python2 leftovers (readthedocs#1514) Docs: update Read the Docs config (readthedocs#1518) Use the latest config file style. Set data-content_root for Sphinx ≥ 7.2 (readthedocs#1507) This attribute is now required by searchtools.js: https://github.com/sphinx-doc/sphinx/blob/v7.2.2/sphinx/themes/basic/static/searchtools.js#L65 When it's not set, loading search results via AJAX will be broken because the JS code will attempt to load paths like /undefinedfoo.html. Co-authored-by: Manuel Kaufmann <humitos@gmail.com> Use `css_tag` helper to inject CSS files (readthedocs#1519) * Use `css_tag` helper to inject CSS files * Typo Add support for `docutils==0.20.x` (readthedocs#1517) Closes readthedocs#1516 Release 2.0rc2 (readthedocs#1520) Version bump for 2.0rc3 development (readthedocs#1521) Next development version is 2.0rc3 for now, but more likely 2.1rc1 Fix readthedocs#1522: fix `'str' object has no attribute 'attributes'` (readthedocs#1528) * Fix readthedocs#1522: fix attribute error if css is str * Revert "Fix readthedocs#1522: fix attribute error if css is str" This reverts commit b22a77f. * Use `css_tag` only for standard CSS files from Sphinx ... and keep using the custom `link` HTML tag for CSS files included via the HTML theme option `extra_css_files`. * Normalize template variables --------- Co-authored-by: Manuel Kaufmann <humitos@gmail.com> Co-authored-by: Anthony Johnson <aj@ohess.org> Release 2.0.0rc3 (readthedocs#1535) Increment for next potential release (readthedocs#1536) Fix AttributeError when one of `css_files` is a string (readthedocs#1537) Fix AttributeError when one of css_files is a string Release 2.0.0rc4 (readthedocs#1538) Bump for next potential release, 2.0.0rc5 (readthedocs#1539) Release 2.0 final (readthedocs#1544)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This attribute is now required by searchtools.js:
https://github.com/sphinx-doc/sphinx/blob/v7.2.2/sphinx/themes/basic/static/searchtools.js#L65
And this is what Sphinx' own
layout.html
does:https://github.com/sphinx-doc/sphinx/blob/v7.2.2/sphinx/themes/basic/layout.html#L105
When the attribute is not set, loading search results via AJAX will be broken because the JS code will attempt to load paths like
/undefinedfoo.html
.