Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: readthedocs/sphinx_rtd_theme
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.3.0
Choose a base ref
...
head repository: readthedocs/sphinx_rtd_theme
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.0.0
Choose a head ref
  • 19 commits
  • 15 files changed
  • 5 contributors

Commits on Aug 21, 2023

  1. 2.0 milestone: drop supported versions (#1500)

    * 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>
    humitos and agjohnson authored Aug 21, 2023
    Copy the full SHA
    0e7b28a View commit details
  2. Release 2.0.0rc1 (#1510)

    * Release 2.0.0rc1
    
    * Update npm lock file
    agjohnson authored Aug 21, 2023
    Copy the full SHA
    6cf2ae7 View commit details
  3. Copy the full SHA
    52e0cad View commit details

Commits on Aug 22, 2023

  1. Docs: Remove "git install" method from instructions (#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>
    benjaoming and humitos authored Aug 22, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    923f987 View commit details

Commits on Aug 23, 2023

  1. Visual test with Firefox and tox (#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 #1388
    Closes #1388
    
    * Default value for `DISPLAY` and `--new-tab`
    
    * Simplify the idea :)
    humitos authored Aug 23, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    davidmc24 David M. Carr
    Copy the full SHA
    c190c00 View commit details

Commits on Aug 28, 2023

  1. Copy the full SHA
    ffdabad View commit details
  2. Docs: update Read the Docs config (#1518)

    Use the latest config file style.
    humitos authored Aug 28, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    41aca73 View commit details

Commits on Aug 29, 2023

  1. Set data-content_root for Sphinx ≥ 7.2 (#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>
    mitya57 and humitos authored Aug 29, 2023
    Copy the full SHA
    4874e94 View commit details
  2. Use css_tag helper to inject CSS files (#1519)

    * Use `css_tag` helper to inject CSS files
    
    * Typo
    humitos authored Aug 29, 2023
    Copy the full SHA
    d34b71b View commit details
  3. Add support for docutils==0.20.x (#1517)

    Closes #1516
    humitos authored Aug 29, 2023
    Copy the full SHA
    5838e6a View commit details
  4. Release 2.0rc2 (#1520)

    agjohnson authored Aug 29, 2023
    Copy the full SHA
    46f5307 View commit details
  5. Version bump for 2.0rc3 development (#1521)

    Next development version is 2.0rc3 for now, but more likely 2.1rc1
    agjohnson authored Aug 29, 2023
    Copy the full SHA
    8ce23ce View commit details

Commits on Oct 24, 2023

  1. Fix #1522: fix 'str' object has no attribute 'attributes' (#1528)

    * Fix #1522: fix attribute error if css is str
    
    * Revert "Fix #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>
    3 people authored Oct 24, 2023
    Copy the full SHA
    32310a8 View commit details
  2. Release 2.0.0rc3 (#1535)

    agjohnson authored Oct 24, 2023
    Copy the full SHA
    febde39 View commit details
  3. Copy the full SHA
    84aea9b View commit details

Commits on Oct 30, 2023

  1. Fix AttributeError when one of css_files is a string (#1537)

    Fix AttributeError when one of css_files is a string
    mitya57 authored Oct 30, 2023
    Copy the full SHA
    4498e97 View commit details

Commits on Oct 31, 2023

  1. Release 2.0.0rc4 (#1538)

    agjohnson authored Oct 31, 2023
    Copy the full SHA
    53ca116 View commit details
  2. Copy the full SHA
    c104410 View commit details

Commits on Nov 28, 2023

  1. Release 2.0 final (#1544)

    agjohnson authored Nov 28, 2023
    Copy the full SHA
    7c9b1b5 View commit details
Showing with 150 additions and 328 deletions.
  1. +12 −16 .circleci/config.yml
  2. +5 −1 .readthedocs.yml
  3. +21 −1 docs/changelog.rst
  4. +23 −28 docs/contributing.rst
  5. +8 −26 docs/demo/api.rst
  6. +0 −152 docs/demo/test_py_module/test_py27.py
  7. +42 −13 docs/development.rst
  8. +0 −18 docs/installing.rst
  9. +1 −1 package-lock.json
  10. +1 −1 package.json
  11. +5 −5 setup.cfg
  12. +1 −1 setup.py
  13. +12 −20 sphinx_rtd_theme/__init__.py
  14. +8 −7 sphinx_rtd_theme/layout.html
  15. +11 −38 tox.ini
28 changes: 12 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -11,10 +11,14 @@ commands:
type: string
sphinx-version:
type: string
default: "18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,45,50,51,52,latest"
default: "latest"
steps:
- checkout
- run: pip install --user tox~=3.27
# We cannot upgrade to Tox4 because running generative environments doesn't work.
# I guess it has changed its syntax or similar.
# $ tox run -e "py310-sphinx{50,51}"
# ROOT: HandledError| provided environments not found in configuration file: ['51}']
- run: pip install --user 'tox~=3.27'
- run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
run-build:
description: "Ensure built assets are up to date"
@@ -40,53 +44,48 @@ jobs:
- image: 'cimg/python:3.9-node'
steps:
- run-build: {}
py27:
docker:
- image: 'cimg/python:2.7'
steps:
- run-tox:
version: py27
sphinx-version: "17,18"
py36:
docker:
- image: 'cimg/python:3.6'
steps:
- run-tox:
version: py36
sphinx-version: "50,51,52,53"
py37:
docker:
- image: 'cimg/python:3.7'
steps:
- run-tox:
version: py37
sphinx-version: "50,51,52,53"
py38:
docker:
- image: 'cimg/python:3.8'
steps:
- run-tox:
version: py38
sphinx-version: "18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,45,50,51,52,60,latest"
sphinx-version: "50,51,52,53,60,61,62,70,71,latest"
py39:
docker:
- image: 'cimg/python:3.9'
steps:
- run-tox:
version: py39
sphinx-version: "18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,45,50,51,52,60,latest"
sphinx-version: "50,51,52,53,60,61,62,70,71,72,latest"
py310:
docker:
- image: 'cimg/python:3.10'
steps:
- run-tox:
version: py310
sphinx-version: "42,43,44,45,50,51,52,53,60,latest"
sphinx-version: "50,51,52,53,60,61,62,70,71,72,latest"
py311:
docker:
- image: 'cimg/python:3.11'
steps:
- run-tox:
version: py311
sphinx-version: "53,60,latest"
sphinx-version: "53,60,61,62,70,71,72,latest,dev"

workflows:
version: 2
@@ -111,6 +110,3 @@ workflows:
- py36:
requires:
- build
- py27:
requires:
- build
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.10"

python:
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
22 changes: 21 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -4,7 +4,27 @@ Changelog

.. seealso:: :ref:`howto_upgrade`

.. |theme_version| replace:: 1.3.0
.. |theme_version| replace:: 2.0.0

.. _release-2.0.0:

2.0.0
=====

Added
-----

* Support for Sphinx versions ``6.x`` and ``7.x``
* Support for docutils ``<=0.20``

Deprecations
------------

* The HTML4 writer is now officially deprecated. An error will be thrown if your
project configuration still uses the HTML4 writer.
* Support for Sphinx versions < 5.0 was removed.
* In addition, our supported dependencies will match the dependencies from our
lowest supported Sphinx release, version 5.0: Python >= 3.6 and docutils > 0.14 and < 0.19

.. _release-1.3.0:

51 changes: 23 additions & 28 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -103,20 +103,18 @@ compatibility.

The following cases need to be tested with changes to CSS or JavaScript:

* Multiple, modern browsers should be tested. We officially support back
to IE11 at the moment
* Multiple viewport sizes should be tested for changes. We support large,
tablet, and mobile viewport sizes
* We currently support both the Sphinx HTML4 writer and HTML5 writer. This makes
for some complex CSS selectors
* Multiple major versions of Sphinx should be tested. We currently support back
to Sphinx version ``1.6``
* Multiple, modern browsers should be tested.
* Multiple viewport sizes should be tested for changes.
We support large, tablet, and mobile viewport sizes
* We currently support only HTML5 writer.
* Multiple major versions of Sphinx should be tested.
We currently support Sphinx ``>=5.0``

It's easiest to test combinations of dependency versions using ``tox``:

.. code:: console
% tox -e py3-sphinx34-html4
% tox -e py310-sphinx62
If the tests and build are successful, you can view the built documentation at
the directory noted by Sphinx:
@@ -125,9 +123,9 @@ the directory noted by Sphinx:
build succeeded, 10 warnings.
The HTML pages are in .tox/py3-sphinx34-html4/tmp/html.
The HTML pages are in .tox/py310-sphinx62/tmp/html.
___________________________ summary ___________________________
py3-sphinx34-html4: commands succeeded
py310-sphinx62: commands succeeded
congratulations :)
You can then open up this path with a series of browsers to test.
@@ -137,12 +135,12 @@ multiple ``tox`` environments, and open both up for comparison:

.. code:: console
% tox -e py3-sphinx34-html4
% tox -e py310-sphinx62
...
% tox -e py3-sphinx34-html5
% tox -e py310-sphinx53
...
% firefox .tox/py3-sphinx34-html4/tmp/html/index.html
% firefox .tox/py3-sphinx34-html5/tmp/html/index.html
% firefox .tox/py310-sphinx62/tmp/html/index.html
% firefox .tox/py310-sphinx53/tmp/html/index.html
You can also use a separate ``tox`` environment for building output to compare
against. All of the ``tox`` environments have an additional postfix, ``-qa``, to
@@ -155,28 +153,25 @@ For example, to test against the tag ``0.5.2``:
.. code:: console
% git checkout 0.5.2
% tox -e py3-sphinx34-html4-qa
% tox -e py310-sphinx53-qa
...
% git checkout feature/example-pull-request
% tox -e py3-sphinx34-html4
% tox -e py310-sphinx53
...
% firefox .tox/py3-sphinx34-html4-qa/tmp/html/index.html
% firefox .tox/py3-sphinx34-html4/tmp/html/index.html
% firefox .tox/py310-sphinx53-qa/tmp/html/index.html
% firefox .tox/py310-sphinx53/tmp/html/index.html
Currently, the most important environments to QA are:

.. This list is purposely shorter than what we describe above. If we test all of
the cases above, we'll be here all day. Python 3, HTML4/5 writer, and latest
the cases above, we'll be here all day. Python 3, and latest
minor of each major Sphinx release should give us enough work.
* ``py3-sphinx18-html4``
* ``py3-sphinx18-html5``
* ``py3-sphinx24-html4``
* ``py3-sphinx24-html5``
* ``py3-sphinx35-html4``
* ``py3-sphinx35-html5``
* ``py3-sphinx41-html4``
* ``py3-sphinx41-html5``
* ``py310-sphinx53``
* ``py310-sphinx62``
* ``py310-sphinx72``
* ``py310-sphinxlatest``
* ``py310-sphinxdev``

Translations
============
34 changes: 8 additions & 26 deletions docs/demo/api.rst
Original file line number Diff line number Diff line change
@@ -7,19 +7,11 @@ API documentation and generated content
:mod:`test_py_module`
=====================

.. only:: python3
.. automodule:: test_py_module.test
:members:
:private-members:
:special-members:

.. automodule:: test_py_module.test
:members:
:private-members:
:special-members:

.. only:: python2

.. automodule:: test_py_module.test_py27
:members:
:private-members:
:special-members:

C++ API
=======
@@ -153,18 +145,8 @@ Sphinx Extensions
sphinx.ext.autosummary
----------------------

.. only:: python3

.. autosummary::

test_py_module.test.add_numbers
test_py_module.test.subtract_numbers
test_py_module.test.Foo

.. only:: python2

.. autosummary::
.. autosummary::

test_py_module.test_py27.add_numbers
test_py_module.test_py27.subtract_numbers
test_py_module.test_py27.Foo
test_py_module.test.add_numbers
test_py_module.test.subtract_numbers
test_py_module.test.Foo
Loading