8000 Merge branch 'readthedocs:master' into master · python-sidebar/python_rtd_theme@45cb470 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45cb470

Browse files
Merge branch 'readthedocs:master' into master
2 parents 847f021 + 9c75444 commit 45cb470

33 files changed

+673
-674
lines changed

.circleci/config.yml

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ commands:
1111
type: string
1212
sphinx-version:
1313
type: string
14-
default: "17,18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,45,50,51,52,latest"
14+
default: "latest"
1515
steps:
1616
- checkout
17-
- run: pip install --user tox~=3.27
17+
# We cannot upgrade to Tox4 because running generative environments doesn't work.
18+
# I guess it has changed its syntax or similar.
19+
# $ tox run -e "py310-sphinx{50,51}"
20+
# ROOT: HandledError| provided environments not found in configuration file: ['51}']
21+
- run: pip install --user 'tox~=3.27'
1822
- run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
1923
run-build:
2024
description: "Ensure built assets are up to date"
@@ -40,59 +44,51 @@ jobs:
4044
- image: 'cimg/python:3.9-node'
4145
steps:
4246
- run-build: {}
43-
py27:
44-
docker:
45-
- image: 'cimg/python:2.7'
46-
steps:
47-
- run-tox:
48-
version: py27
49-
sphinx-version: "17,18"
50-
py36:
51-
docker:
52-
- image: 'cimg/python:3.6'
53-
steps:
54-
- run-tox:
55-
version: py36
56-
py37:
57-
docker:
58-
- image: 'cimg/python:3.7'
59-
steps:
60-
- run-tox:
61-
version: py37
6247
py38:
6348
docker:
6449
- image: 'cimg/python:3.8'
6550
steps:
6651
- run-tox:
6752
version: py38
68-
sphinx-version: "17,18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,45,50,51,52,60,latest"
53+
sphinx-version: "60,61,62,70,71"
6954
py39:
7055
docker:
7156
- image: 'cimg/python:3.9'
7257
steps:
7358
- run-tox:
7459
version: py39
75-
sphinx-version: "17,18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,45,50,51,52,60,latest"
60+
sphinx-version: "60,61,62,70,71,72,73,74"
7661
py310:
7762
docker:
7863
- image: 'cimg/python:3.10'
7964
steps:
8065
- run-tox:
8166
version: py310
82-
sphinx-version: "42,43,44,45,50,51,52,53,60,latest"
67+
sphinx-version: "60,61,62,70,71,72,73,74,80,latest,dev"
8368
py311:
8469
docker:
8570
- image: 'cimg/python:3.11'
8671
steps:
8772
- run-tox:
8873
version: py311
89-
sphinx-version: "53,60,latest"
74+
sphinx-version: "72,73,74,80,latest,dev"
75+
76+
py312:
77+
docker:
78+
- image: 'cimg/python:3.12'
79+
steps:
80+
- run-tox:
81+
version: py312
82+
sphinx-version: "72,73,74,80,latest,dev"
9083

9184
workflows:
9285
version: 2
9386
tests:
9487
jobs:
9588
- build
89+
- py312:
90+
requires:
91+
- build
9692
- py311:
9793
requires:
9894
- build
@@ -105,12 +101,3 @@ workflows:
105101
- py38:
106102
requires:
107103
- build
108-
- py37:
109-
requires:
110-
- build
111-
- py36:
112-
requires:
113-
- build
114-
- py27:
115-
requires:
116-
- build

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ sphinx_rtd_theme/static/fonts/RobotoSlab/
2424
.node-version
2525
.tool-versions
2626
.nvmrc
27-
sphinx_rtd_theme/static/js/html5shiv.min.js
28-
sphinx_rtd_theme/static/js/html5shiv-printshiv.min.js
2927
.direnv/
3028
.envrc
3129
# Used for dockerized builds

.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
version: 2
22

3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "3.10"
7+
38
python:
4-
version: 3.8
59
install:
610
- requirements: docs/requirements.txt
711
- method: pip

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This implicitely includes Python 3.10
1+
# This implicitly includes Python 3.10
22
FROM node:14-alpine
33

44
# Do not use --update since that will also fetch the

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ recursive-include sphinx_rtd_theme *.css
77
recursive-include sphinx_rtd_theme *.eot
88
recursive-include sphinx_rtd_theme *.html
99
recursive-include sphinx_rtd_theme *.js
10+
recursive-include sphinx_rtd_theme *.js_t
1011
recursive-include sphinx_rtd_theme *.svg
1112
recursive-include sphinx_rtd_theme *.ttf
1213
recursive-include sphinx_rtd_theme *.woff

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ docker-images:
77
docker-npm-build:
88
rm -f .container_id
99
docker-compose run -d sphinx_rtd_theme build > .container_id
10+
sleep 1s
1011
docker container wait "$(shell cat .container_id)"
1112
docker cp "$(shell cat .container_id):/project/sphinx_rtd_theme" .
1213
docker cp "$(shell cat .container_id):/project/package-lock.json" .
1314
@echo "Done building"
1415

1516
docker-npm-dev:
1617
docker-compose run sphinx_rtd_theme dev
17-
18+
1819
docker-build-all: docker-images docker-npm-build

docs/changelog.rst

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,115 @@ Changelog
44

55
.. seealso:: :ref:`howto_upgrade`
66

7-
|theme_version|
8-
===============
7+
.. |theme_version| replace:: 3.0.0rc1
98

10-
.. |theme_version| replace:: 1.2.1alpha1
9+
.. _release-3.0.0rc1:
10+
11+
3.0.0rc1
12+
========
13+
14+
Added
15+
-----
16+
17+
* Added support for Sphinx 8.
18+
* Added support for Python 3.12.
19+
* Added support for docutils ``>0.18, <0.22``.
20+
* Populate ``html_context`` with all the environment variables starting with ``READTHEDOCS_``.
21+
22+
Deprecations
23+
------------
24+
25+
* Drop support for Sphinx ``<6.0``.
26+
* Drop support for Python ``<3.8``.
27+
* ``analytics_id`` and ``analytics_anonymize_ip`` are deprecated, use sphinxcontrib-googleanalytics_ instead.
28+
* Drop support for all versions of Internet Explorer.
29+
* Raise a warning when defining ``html_theme_path``. This was an old config that's not required anymore.
30+
* ``extra_css_files`` is deprecated and support will be removed in a future version.
31+
32+
.. _sphinxcontrib-googleanalytics: https://pypi.org/project/sphinxcontrib-googleanalytics/
33+
34+
.. _release-2.1.0rc2:
35+
36+
2.1.0rc2
37+
========
38+
39+
Added
40+
-----
41+
42+
* Added ``flyout_display`` option to display the flyout
43+
``attached`` (bottom of the sidebard) or ``hidden`` (default).
44+
45+
.. _release-2.1.0rc1:
46+
47+
2.1.0rc1
48+
========
49+
50+
Added
51+
-----
52+
53+
* Render the menu versions/languages selector (flyout)
54+
using the new ``readthedocs-addons-data-ready`` Read the Docs Addons ``CustomEvent``.
55+
56+
Deprecations
57+
------------
58+
59+
* Remove ``html5shiv``.
60+
61+
.. _release-2.0.0:
62+
63+
2.0.0
64+
=====
65+
66+
Added
67+
-----
68+
69+
* Support for Sphinx versions ``6.x`` and ``7.x``
70+
* Support for docutils ``<=0.20``
71+
72+
Deprecations
73+
------------
74+
75+
* The HTML4 writer is now officially deprecated. An error will be thrown if your
76+
project configuration still uses the HTML4 writer.
77+
* Support for Sphinx versions < 5.0 was removed.
78+
* In addition, our supported dependencies will match the dependencies from our
79+
lowest supported Sphinx release, version 5.0: Python >= 3.6 and docutils > 0.14 and < 0.19
80+
81+
.. _release-1.3.0:
82+
83+
1.3.0
84+
=====
85+
86+
Added
87+
-----
88+
89+
* Relaxed requirements to include Sphinx release ``7.0``
90+
91+
.. _release-1.2.2:
92+
93+
1.2.2
94+
=====
95+
96+
Fixes
97+
-----
98+
99+
* Require `sphinxcontrib-jquery>=4,<5` (#1446)
100+
101+
Added
102+
-----
103+
104+
* Styling for `:menuselection:` (#1426)
105+
106+
107+
.. _release-1.2.1:
108+
109+
1.2.1
110+
=====
111+
112+
Fixes
113+
-----
114+
115+
* Load jQuery correctly when using latest sphinxcontrib-jquery release (#1448)
11116

12117

13118
.. _release-1.2.0:

docs/configuring.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For example:
2121
'style_external_links': False,
2222
'vcs_pageview_mode': '',
2323
'style_nav_header_background': 'white',
24+
'flyout_display': 'hidden',
2425
# Toc options
2526
'collapse_navigation': True,
2627
'sticky_navigation': True,
@@ -101,7 +102,11 @@ Miscellaneous options
101102

102103
:type: string
103104

105+
.. deprecated:: 3.0.0
106+
The ``analytics_id`` option is deprecated, use the sphinxcontrib-googleanalytics_ extension instead.
107+
104108
.. _gtag.js: https://developers.google.com/gtagjs
109+
.. _sphinxcontrib-googleanalytics: https://pypi.org/project/sphinxcontrib-googleanalytics/
105110

106111
.. confval:: analytics_anonymize_ip
107112

@@ -110,6 +115,9 @@ Miscellaneous options
110115
:type: boolean
111116
:default: ``False``
112117

118+
.. deprecated:: 3.0.0
119+
The ``analytics_anonymize_ip`` option is deprecated, use the sphinxcontrib-googleanalytics_ extension instead.
120+
113121
.. confval:: canonical_url
114122

115123
This will specify a `canonical URL`_ meta link element to tell search
@@ -174,6 +182,16 @@ Miscellaneous options
174182
:type: string
175183
:default: ``#2980B9``
176184

185+
.. confval:: flyout_display
186+
187+
Specify how to display the flyout (language and version selector).
188+
This can be either ``attached`` or ``hidden``.
189+
``attached`` means that it will show the flyout in the bottom of the sidebar.
190+
You will need to disable the default `Read the Docs flyout <https://docs.readthedocs.io/en/stable/flyout-menu.html>`_ in order to not have 2 flyouts showing.
191+
192+
:type: str
193+
:default: ``hidden``
194+
177195

178196
File-wide metadata
179197
==================

0 commit comments

Comments
 (0)
0