* Run tests and build docs with Sphinx 8.2
* CircleCI job
* Update Read the Docs dependencies
* Update matrix
* Run tests with 3.13
* Use 8.x to build our docs
When sidebar is set to 100% width on mobile, it should also be switched
back to being non-floating.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
* Show version/language selectors below the title
* Use CSS styles from old attempt
https://github.com/readthedocs/sphinx_rtd_theme/pull/438
* Update CSS to apply to both selectors
* Prepend the current version if it's hidden
* Split it into two different configs
* Use correct value for language
* Make the selectors more prominent
* Typo fix on comment
* Update CSS
* Update JavaScript
* Always include the version javascript
* Only include the languages if there is one
* Change `display_version` default
* HTML layout rework
* Update docs
* HTML layout fix
* Docs typo
* Update CSS
* Updates from review
* re-compile CSS
* Update CSS
* Apply suggestions from code review
Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
* Use the prettier to lint the file
* Whitespaces
* Update event listener
* Update CSS
* Update CSS
* Remove language switch if there are not translations
* Tune version and language selector styles (#1603)
* Tuning on select width and icon placement
* Use better cursor
* Add a max width to selects so that they can't overflow
* Only add after pseudo element if select exists
* Lint
* Debug: trigger Read the Docs Addons event to test/debug locally (#1606)
* Debug: trigger Read the Docs Addons event to test/debug locally
Closes#1605
* Push missing file
---------
Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
Co-authored-by: Anthony <aj@ohess.org>
* Tests: `sphinxdev` tox environment installs Sphinx from `master`
It seems we had a bug in the name and it wasn't installing Sphinx from `master`.
I expect this test to fail now because we pin `Sphinx<8`, but that's fine for now.
* Prepare for 3.0 release
- Drop Python <3.8
- Drop docutils <=0.18
- Add support for docutils 0.21
- Add support for Python 3.12
This follows the plan we wrote in
https://sphinx-rtd-theme.readthedocs.io/en/stable/development.html#roadmap-release-3-0-0
The main idea here is to move forward with newer versions and drop support for
old stuffs so we reduce the maintanence burden.
* Update CircleCI matrix
* More fixes to CircleCI
* Run test over Sphinx 8.0
* Update contributing guide
* Remove deprecated `readthedocs-sphinx-ext`
* Remove old Sphinx versions
* Uninstall our extension
* Show a warning if `extra_css_files` is in the `html_context`
See https://github.com/readthedocs/sphinx_rtd_theme/pull/450
* Update development page
* Add deprecate warning for `analytics_` theme options
* Update docs
* Remove unused dependency
Closes#1533
* Remove environment variables from our docs
This was already added in a more generic way to the theme itself.
* Require Sphinx >=6.0
* Deprecation warning about `get_html_theme_path`
See https://github.com/readthedocs/sphinx_rtd_theme/pull/1479#issuecomment-2296317034
* Docs: update the installation note
Translated string work with/without the theme added into the ``extensions``.
However, it's still required to be inside the extensions because of
``sphinxcontrib-jquery``.
I'm keeping the note, but changing it content.
* Update docs/installing.rst
Co-authored-by: Anthony <aj@ohess.org>
---------
Co-authored-by: Anthony <aj@ohess.org>
* Theme option `flyout` to enable/disable theme's flyout
Add a theme option to enable/disable the theme's flyout integrated at the bottom
left into the navigation bar.
Closes#1579
* Use `flyout_display` with `hidden` and `attached` as options
* Make `hidden` as `flyout_display`
* Update docs/configuring.rst
Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
---------
Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
It seems we had a bug in the name and it wasn't installing Sphinx from `master`.
I expect this test to fail now because we pin `Sphinx<8`, but that's fine for now.
* Addons: integrate with new beta addons flyout
Initial experimentation to use the `CustomEvent` triggered by the addons called
`readthedocsdataready` event (from
https://github.com/readthedocs/addons/pull/64/) to build the Read the Docs
flyout being integrated into the theme keeping the original look & feel.
* Related: https://github.com/readthedocs/addons/pull/64/
* Closes#1523
* `READTHEDOCS` variable has to be passed to the `html_context`
This is because we are not executing the Read the Docs magic that modifies the
`conf.py` file on the fly :/
* Update code to match the latest changes
* Use `.join` to avoid rendering the Array with `,`
* Update code to use the v1 API structure response
* Don't auto-remove the original flyout
This can be disabled per-project by using the settings UI from the dashboard.
* Join the values to avoid strange `,`s
* Support translations
Use the current pattern to translate string generated for the flyout.
* Remove HTML tags for testing
* Show "Search" section on flyout
* Render footer
* Add some styling
* TODO comments to work on
* add `div.injected`
* Apply suggestions from code review
Co-authored-by: Anthony <aj@ohess.org>
* Translate privacy policy
* Add `.rtd-current-item` class to selected version/language
* Refactor code to show sections only if there is content
* Epub instead of EPUB for backward compatibility
* Show the modal when clicking on the "Search docs" from navbar
* Remove privacy policy link from flyout
* Add UTM analytics
* Move CSS style into SASS file
* Move the `script` tag into its own file
* Rename JS file to mark it as a Sphinx template
* Build css/js files
Run `npm ci` and `npm run build` using NodeJS 14.20.1.
* Add the JS template in the package
---------
Co-authored-by: Anthony <aj@ohess.org>
* Fix typo
* Lock file changes after running 'npm install --lockfile-version 1' w/ Node 14
* Format file prior to change
* Remove the html5shiv JS package & all references to it
* Remove the copy-webpack-plugin JS package as no longer used
---------
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
* 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 3afbed2950.
* Set `data-content_root` for Sphinx >= 7.2
Copied from https://github.com/readthedocs/sphinx_rtd_theme/pull/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 #1388Closes#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>
* Remove pytest warnings
Ignore deprecations on Sphinx 9.0 that comes from readthedocs-sphinx-ext and use
`findall()` instead of `.traverse()` as suggested by docutils.
* We can't ignore a warning from Sphinx 9.0
We are testing in older versions where this exception is not defined.
The deprecation warning we are seeing here is not related to `sphinx_rtd_theme`
but with `readthedocs-sphinx-ext` because at:
13edf78bab/readthedocs_ext/readthedocs.py (L118-L122)
In any case, we will stop using that Sphinx extension at some point.
* Fix#1522: fix attribute error if css is str
* Revert "Fix #1522: fix attribute error if css is str"
This reverts commit b22a77f35a.
* 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>
* 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 #1388Closes#1388
* Default value for `DISPLAY` and `--new-tab`
* Simplify the idea :)
* 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>
* 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>