Commit Graph

1481 Commits

Author SHA1 Message Date
Max Dudzinski
28c377f99a
Remove html5shiv (#1482)
* 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>
2024-01-25 12:03:15 -08:00
Manuel Kaufmann
80de90aecf
Remove Sphinx<5 compatibility leftovers (#1512)
* 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 #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>
2024-01-03 12:19:50 +01:00
Manuel Kaufmann
17111add80
Remove pytest warnings (#1515)
* 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.
2024-01-02 13:22:55 +01:00
Anthony
2da37d6afd
Set up for next release (#1545) 2023-11-28 10:00:56 -08:00
Anthony
7c9b1b5d39
Release 2.0 final (#1544) 2023-11-27 20:04:13 -08:00
Anthony
c104410760
Bump for next potential release, 2.0.0rc5 (#1539) 2023-10-31 14:27:11 -07:00
Anthony
53ca116ef6
Release 2.0.0rc4 (#1538) 2023-10-31 14:15:47 -07:00
Dmitry Shachnev
4498e97b46
Fix AttributeError when one of css_files is a string (#1537)
Fix AttributeError when one of css_files is a string
2023-10-30 11:41:11 -07:00
Anthony
84aea9b0ba
Increment for next potential release (#1536) 2023-10-24 11:49:43 -07:00
Anthony
febde39c7c
Release 2.0.0rc3 (#1535) 2023-10-23 19:12:58 -07:00
Mathieu Leplatre
32310a8190
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 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>
2023-10-23 19:05:59 -07:00
Anthony
8ce23cec96
Version bump for 2.0rc3 development (#1521)
Next development version is 2.0rc3 for now, but more likely 2.1rc1
2023-08-29 16:16:22 -07:00
Anthony
46f5307dbd
Release 2.0rc2 (#1520) 2023-08-29 16:11:46 -07:00
Manuel Kaufmann
5838e6aa54
Add support for docutils==0.20.x (#1517)
Closes #1516
2023-08-29 12:12:25 +02:00
Manuel Kaufmann
d34b71bb09
Use css_tag helper to inject CSS files (#1519)
* Use `css_tag` helper to inject CSS files

* Typo
2023-08-29 11:43:41 +02:00
Dmitry Shachnev
4874e9428d
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>
2023-08-29 11:03:49 +02:00
Manuel Kaufmann
41aca736bc
Docs: update Read the Docs config (#1518)
Use the latest config file style.
2023-08-28 19:23:03 +02:00
Manuel Kaufmann
ffdabadaa4
Remove Python2 leftovers (#1514) 2023-08-28 17:16:30 +02:00
Manuel Kaufmann
c190c0064b
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 :)
2023-08-23 18:23:48 +02:00
Benjamin Balder Bach
923f9874a9
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>
2023-08-22 09:28:16 -07:00
Anthony
52e0cad4c2
Bump to next release 2.0.0rc2 (#1511) 2023-08-21 12:03:21 -07:00
Anthony
6cf2ae7951
Release 2.0.0rc1 (#1510)
* Release 2.0.0rc1

* Update npm lock file
2023-08-21 11:59:16 -07:00
Manuel Kaufmann
0e7b28ad4a
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>
2023-08-21 11:38:57 -07:00
Anthony
15ed4de08d
Release 1.3.0 (#1509)
Bump the RC to final
2023-08-21 11:25:09 -07:00
Anthony
b5833585b2
1.3.0rc2 (#1495)
The repo is normally bumped to the next up potential release so it
doesn't conflict with the current release.
2023-08-03 17:49:54 -07:00
Anthony
775bca403c
Release 1.3.0rc1 (#1494)
* Release 1.3.0rc1

* Update lock file
2023-08-03 17:27:33 -07:00
Benjamin Balder Bach
04f85fc422
Add Sphinx 7 support (#1464)
* Allow Sphinx 7

* Also build theme docs with Sphinx 7

* Add more tests cases on tox.ini

* Increase the Sphinx version for the docs

---------

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2023-08-03 17:15:33 -07:00
Benjamin Balder Bach
9899ee4ee2
Release 1.2.2 (#1484)
* Changelog for 1.2.2

* 1.2.2rc1

* Build: Fix bug that reads out container id from previous run

* Update package-lock to match release

* Bump to 1.2.2 final
2023-06-07 15:27:05 +02:00
Benjamin Balder Bach
2442ab9ffd
Remove version logic on sphinxcontrib-jquery, require >=4,<5 (#1446)
* Remove version logic on sphinxcontrib-jquery, require >=4,<5

* Bump to Sphinx 6.1.x

* Remove testing for Sphinx 1.7, sphinxcontrib-jquery 4.x blocks it
2023-05-25 18:47:50 +02:00
Benjamin Balder Bach
cd6b429f87
:menuselection: style (#1426)
* Adds a bit of basic styling for `:menuselection:`

* Rebuild CSS

* Remove docs demo, there was one already exactly below :)

* Make menuselection color same as guilabel

* Update assets for https://github.com/readthedocs/sphinx_rtd_theme/pull/1426
2023-05-24 17:16:18 +02:00
Benjamin Balder Bach
2107797b00
Contributing updates (#1478)
* Add reminder to pull from remote

* Sign git tags
2023-05-23 13:34:46 +02:00
Benjamin Balder Bach
72691f5025
Release 1.2.1 (#1474)
* Run bump2version

* Add changelog
2023-05-23 11:16:18 +02:00
Tapple Gao
d836ff798c
Docs: Typo in recommended pinning (#1476)
* Typo in recommended pinning

The paragraph above recommends "less than the next major version". But the example says `<=`. Make them match

* Update development.rst
2023-05-18 15:08:10 +02:00
Benjamin Balder Bach
4d6de11137
Add a call to add_js_files (sphinxcontrib.query) (#1448)
* Add a call to add_js_files since it doesn't happen when loading extension from theme https://github.com/sphinx-contrib/jquery/issues/23

* Avoid importing from sphinxcontrib.jquery in __init__

* Add reference to issue
2023-05-17 19:46:48 +02:00
Miller Abel
03a86b803c
fixed type-o in note on automatic index generation (#1458) 2023-04-22 20:58:10 +02:00
Anthony
ee64d37ac9
Bump to next alpha for development (#1433) 2023-02-07 15:30:54 -08:00
Anthony
9d88b9e4e1
Release 1.2.0 (#1432)
* Drop development version header from changelog

This makes just as much sense as a point release header, and won't
require any special attention when we're cutting a release.

* Bump release 1.2.0

* Update package lock
2023-02-07 13:47:28 -08:00
Benjamin Balder Bach
064b6c9f05
release 1.2.0rc4 (#1430)
* Bump to 1.2.0rc4

* Update changelog

* Update translations

* Chinese (Taiwan) was also a new addition
2023-02-06 18:03:20 +01:00
Benjamin Balder Bach
cd99c0f284
Do not use sphinxcontrib-jquery 3.0.0 but anticipate a fixed release (#1421)
* Do not use sphinxcontrib-jquery but anticipate a fixed release

* Only require sphinxcontrib-jquery on Python 3 (Sphinx 6 isn't released for 2.7)
2023-02-01 19:18:05 +01:00
Benjamin Balder Bach
6444ca8930
Release 1.2.0rc3 (#1414)
* Bump version to 1.2.0rc3

* Update changelog with more entries and known issues

* Update package-lock
2023-01-18 20:14:31 +01:00
Benjamin Balder Bach
5e80b2bd08
Sphinx 6: Use logo_url instead of logo (#1405)
* Sphinx 6: Use logo_url instead of logo

* Handle removal of favicon template context + refactor display of logo and link so it's easier to see what belongs to <4.0 and what is >=4.0

* Adds a favicon to the demo

* Import condensed version logic @agjohnson

* Update sphinx_rtd_theme/layout.html

Co-authored-by: Anthony <aj@ohess.org>

Co-authored-by: Anthony <aj@ohess.org>
2023-01-17 22:48:39 +01:00
Benjamin Balder Bach
ce20cfccca
Updates to package-lock.json for 1.2.0rc2 (#1400)
Updates to package-lock.json
2023-01-04 22:45:54 +01:00
Benjamin Balder Bach
ee488a15d2
1.2.0rc2 (#1397)
* Bump to 1.2.0rc2, add changelog entry on Sphinx 6

* Pull translations (no changes)

* loosen sphinx 6 pinning
2023-01-04 21:47:45 +01:00
Benjamin Balder Bach
f84c4eb558
sphinx-rtd-theme will automatically enable sphinxcontrib-jquery (#1399) 2023-01-04 17:28:19 +01:00
Michael R. Crusoe
0763576a36
support Python 3.11 with Sphinx 5.3+ (#1395)
* support Python 3.11 with Sphinx 5.3+

* Update tox.ini

Co-authored-by: Michael R. Crusoe <1330696+mr-c@users.noreply.github.com>

Co-authored-by: Benjamin Balder Bach <benjamin@overtag.dk>
Co-authored-by: Benjamin Balder Bach <benjaoming@gmail.com>
2023-01-04 16:21:01 +01:00
Benjamin Balder Bach
f11e6c0d33
Allow Sphinx version 6 and add dependency for sphinxcontrib-jquery (#1385)
* Allow Sphinx version 6 and add dependency for sphinxcontrib-jquery

* Adds Sphinx 6.0b2 to Tox test matrix

* Adds Sphinx 6 to relevant Circle CI pipelines

* Build docs with Sphinx 6.0b2

* Use stable Sphinx 6.0.0
2022-12-30 19:56:29 +01:00
Benjamin Balder Bach
a87790a4e2
Release 1.2.0rc1 (#1391)
* Bump to 1.2.0alpha1

* bump 2 1.2.0rc1

* Update package-lock.json from nmp audit

* Sync translations from Transifex (no changes found though)
2022-12-16 12:25:15 +01:00
Benjamin Balder Bach
27d287d203
Add changelog entry for docutils 0.18 support (#1389)
* Add changelog entry for docutils 0.18 support

* Update docs/changelog.rst

Co-authored-by: Anthony <aj@ohess.org>

Co-authored-by: Anthony <aj@ohess.org>
2022-12-15 19:45:12 +01:00
Anthony
a039e52ec5
Add docutils 0.18 citation/footnote support using CSS grid (#1381)
* Add docutils 0.18 citation/footnote support using CSS grid

This is a fix for #1322 that continues our pattern for HTML5 support
using CSS grids, introduced for support for docutils < 0.17 HTML5
support.

* Add lots of backreferences to a footnote

* Drop brackets from footnote/citation links

The brackets seem to be another docutils addition.

* Tune grid display for Sphinx 4 and 5

Backrefs have a new styling that drops a lot of punctuation

* Bump dependency on docutils to < 0.19

* Small tweak to footnote backrefs row span

We don't want to use too large a value here, as some browsers might make
explicit rows for us. We can't target -1 because the row count is
implicit.

* Revert some new styling and use nonbreaking backrefs for now

* Downgrade tox

* Use before pseudo class to break up backrefs consistently
2022-12-15 13:02:39 +01:00
Daniel Mundra
510c620621
Added hidden text for home link in the breadcrumbs. (#1384)
* Added hidden text for home link in breadcrumbs.

* Update breadcrumbs.html

* Update breadcrumbs.html
2022-11-22 14:48:50 +01:00