From 2c2072371ab944db5987a986094ddb0cdd8767fd Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:07:10 +0200 Subject: [PATCH 01/84] Do not underline navigation links --- python_docs_theme/static/pydoctheme.css | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 14464db4..c5e44fc6 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -33,6 +33,30 @@ a[href] { text-decoration: underline 1px; text-underline-offset: 0.25em; } +/* No underline for navigation */ +div.genindex-jumpbox a, +div.modindex-jumpbox a, +div#search-results a, +div.sphinxsidebar a, +div.toctree-wrapper a, +div[role=navigation] a, +table.contentstable a, +table.indextable a { + text-decoration: none; +} + +/* Except when hovered */ +div.genindex-jumpbox a:hover, +div.modindex-jumpbox a:hover, +div#search-results a:hover, +div.sphinxsidebar a:hover, +div.toctree-wrapper a:hover, +div[role=navigation] a:hover, +table.contentstable a:hover, +table.indextable a:hover { + text-decoration: underline; + text-underline-offset: auto; +} body { margin-left: 1em; @@ -284,6 +308,10 @@ div.footer { margin-right: 10px; } +div.footer a { + text-underline-offset: auto; +} + div.footer a:hover { color: #0095c4; } From 761de4d6feefa832cd3fdc57df3292464a1e9f29 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:28:26 +0200 Subject: [PATCH 02/84] Update pre-commit --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 008784c6..d429bb3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,18 +6,18 @@ repos: args: [--py38-plus] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--add-import=from __future__ import annotations] - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: @@ -42,7 +42,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.14 + rev: v0.16 hooks: - id: validate-pyproject From 3e0f891d026e36414049192084a127e827ed0900 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:28:48 +0200 Subject: [PATCH 03/84] Newlines for clarity --- .github/workflows/pypi-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 355a35fd..bd704b5f 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -27,7 +27,9 @@ jobs: name: Publish to PyPI environment: release-pypi # Only run for published releases. - if: github.repository_owner == 'python' && github.event.action == 'published' + if: | + github.repository_owner == 'python' + && github.event.action == 'published' runs-on: ubuntu-latest needs: build-package From ed0650e30ad25239334006343ef044384063b0a1 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:29:21 +0200 Subject: [PATCH 04/84] Specify isort profile for compatibility with Black --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ce22aed0..6009f198 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,9 @@ urls."Issue tracker" = "https://github.com/python/python-docs-theme/issues" [project.entry-points."sphinx.html_themes"] python_docs_theme = 'python_docs_theme' +[tool.isort] +profile = "black" + [tool.flit.module] name = "python_docs_theme" From 2b24269dfe4cad0f1ccafa2a6fd590a265622457 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:32:23 +0200 Subject: [PATCH 05/84] Add Dependabot to keep GitHub Actions up-to-date --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..5c563144 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: monthly + groups: + actions: + patterns: + - "*" From 82c7468ec3fbd883c5ff7decec348728912cae65 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:44:46 +0200 Subject: [PATCH 06/84] Add handy pre-commit checks --- .pre-commit-config.yaml | 14 +++++++++++--- pyproject.toml | 7 ++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d429bb3b..70b4e19a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,6 @@ repos: rev: 5.13.2 hooks: - id: isort - args: [--add-import=from __future__ import annotations] - repo: https://github.com/PyCQA/flake8 rev: 7.0.0 @@ -32,19 +31,28 @@ repos: rev: v4.5.0 hooks: - id: check-case-conflict - - id: check-executables-have-shebangs - id: check-merge-conflict - - id: check-json - id: check-toml - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/tox-dev/pyproject-fmt + rev: 1.7.0 + hooks: + - id: pyproject-fmt + args: [--max-supported-python=3.13] + - repo: https://github.com/abravalheri/validate-pyproject rev: v0.16 hooks: - id: validate-pyproject + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + ci: autoupdate_schedule: quarterly diff --git a/pyproject.toml b/pyproject.toml index 6009f198..272d26ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,9 +36,6 @@ urls."Issue tracker" = "https://github.com/python/python-docs-theme/issues" [project.entry-points."sphinx.html_themes"] python_docs_theme = 'python_docs_theme' -[tool.isort] -profile = "black" - [tool.flit.module] name = "python_docs_theme" @@ -46,3 +43,7 @@ name = "python_docs_theme" include = [ "python_docs_theme/", ] + +[tool.isort] +add_imports = "from __future__ import annotations" +profile = "black" From 78fcd4b989aa5cb34190997fe1540d5852681076 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 2 Feb 2024 23:03:26 +0200 Subject: [PATCH 07/84] Add link to PR of docs preview --- .github/workflows/documentation-links.yml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/documentation-links.yml diff --git a/.github/workflows/documentation-links.yml b/.github/workflows/documentation-links.yml new file mode 100644 index 00000000..f05df37b --- /dev/null +++ b/.github/workflows/documentation-links.yml @@ -0,0 +1,27 @@ +name: Read the Docs PR preview +# Automatically edits a pull request's descriptions with a link +# to the documentation's preview on Read the Docs. + +on: + pull_request_target: + types: + - opened + paths: + - 'Doc/**' + - '.github/workflows/doc.yml' + +permissions: + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + documentation-links: + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "python-docs-theme-previews" + single-version: "true" From 2f38e86cea78c9b31372d0c291119deae5044c6f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:26:28 +0200 Subject: [PATCH 08/84] Only apply underline offset to code formatting for underline visibility --- python_docs_theme/static/pydoctheme.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 14464db4..dff8ee8a 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -31,7 +31,10 @@ pre { a[href] { text-decoration: underline 1px; + +a[href]:has(> code) { text-underline-offset: 0.25em; + color: red; } body { From 98b94c5e56aa86ef887730263993297ead57f7a9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:32:33 +0200 Subject: [PATCH 09/84] Remove debugging --- python_docs_theme/static/pydoctheme.css | 1 - 1 file changed, 1 deletion(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index dff8ee8a..d4049346 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -34,7 +34,6 @@ a[href] { a[href]:has(> code) { text-underline-offset: 0.25em; - color: red; } body { From bd00c3da51f6a00697eefbedf8cf9cd465722561 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:35:39 +0200 Subject: [PATCH 10/84] =?UTF-8?q?Don't=20underline=20the=20pilcrow=20(?= =?UTF-8?q?=C2=B6)=20navigation=20symbol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python_docs_theme/static/pydoctheme.css | 1 + 1 file changed, 1 insertion(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index c5e44fc6..54c16162 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -34,6 +34,7 @@ a[href] { text-underline-offset: 0.25em; } /* No underline for navigation */ +a.headerlink, div.genindex-jumpbox a, div.modindex-jumpbox a, div#search-results a, From 2dd4e77cbcf5d2f46f723a81c3938e2de22a08e2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:46:30 +0200 Subject: [PATCH 11/84] Add missing bracket --- python_docs_theme/static/pydoctheme.css | 1 + 1 file changed, 1 insertion(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index d4049346..263f3f68 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -31,6 +31,7 @@ pre { a[href] { text-decoration: underline 1px; +} a[href]:has(> code) { text-underline-offset: 0.25em; From 14335e475448e2ec561fe650cb3c48088c91c831 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 09:16:30 -0700 Subject: [PATCH 12/84] Update .github/dependabot.yml Co-authored-by: Ezio Melotti --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5c563144..8452ef07 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,8 @@ updates: directory: "/" schedule: interval: monthly + assignees: + - "ezio-melotti" groups: actions: patterns: From 2f3f86ec603341cce76616ed2f83c8a9ee0a4b4e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:20:50 +0200 Subject: [PATCH 13/84] Add comments --- python_docs_theme/static/pydoctheme.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 8112fa4b..959a94e4 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -29,10 +29,12 @@ pre { color: inherit; } +/* Add underlines to links */ a[href] { text-decoration: underline 1px; } +/* Increase the underline offset for code to avoid obscuring underscores */ a[href]:has(> code) { text-underline-offset: 0.25em; } From fbf2bf896c464dcb192735f8e5d1222d5dcdc1eb Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:22:35 +0200 Subject: [PATCH 14/84] Whitespace between CSS blocks --- python_docs_theme/static/pydoctheme.css | 1 + 1 file changed, 1 insertion(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 959a94e4..87a06293 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -38,6 +38,7 @@ a[href] { a[href]:has(> code) { text-underline-offset: 0.25em; } + /* No underline for navigation */ a.headerlink, div.genindex-jumpbox a, From cc1161b2bbc3d7f11e14c1eda31963cc904cbd30 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 12:56:06 -0700 Subject: [PATCH 15/84] README: Add link to preview build --- README.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0a8db3fb..5055bad1 100644 --- a/README.rst +++ b/README.rst @@ -21,4 +21,11 @@ To use this theme, add the following to ``conf.py``: - ``html_theme = 'python_docs_theme'`` -- ``html_sidebars``, defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars +- ``html_sidebars``, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars + +Preview +------- + +See a demo of the CPython docs using this theme: + +- https://python-docs-theme-previews.readthedocs.io From b3d1ae14eb0c7223b3430d42c8a085aeece3f744 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:50:50 +0200 Subject: [PATCH 16/84] Prepare 2024.2 release --- CHANGELOG.rst | 17 ++++++++++++----- pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f44760d2..0b02c3f6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,18 +1,25 @@ -========= Changelog ========= +`2024.2 `_ +---------------------------------------------------------------------------- + +- Do not underline navigation links (#169) + Contributed by Hugo van Kemenade +- Only apply underline offset to code formatting for underline visibility (#171) + Contributed by Hugo van Kemenade + `2024.1 `_ ---------------------------------------------------------------------------- - Underline links for readability and a11y (#160, #166) - Contributed by Hugo van Kemenade + Contributed by Hugo van Kemenade - Add ``hosted_on`` variable for a link in the footer (#165) - Contributed by Hugo van Kemenade + Contributed by Hugo van Kemenade - Consistently reference ``theme_root_icon`` (#163) - Contributed by Marko Budiselic + Contributed by Marko Budiselic - Dark mode: fix contrast of footer highlight (#162) - Contributed by Hugo van Kemenade + Contributed by Hugo van Kemenade `2023.9 `_ ---------------------------------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index ce22aed0..dd228f4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ [project] name = "python-docs-theme" -version = "2024.1" +version = "2024.2" description = "The Sphinx theme for the CPython docs and related projects" readme = "README.rst" license.file = "LICENSE" From 35e9780170330819243e43b3d88f9715a4e1801a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Feb 2024 16:39:58 +0000 Subject: [PATCH 17/84] Bump the actions group with 5 updates Bumps the actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/setup-python](https://github.com/actions/setup-python) | `4` | `5` | | [pre-commit/action](https://github.com/pre-commit/action) | `3.0.0` | `3.0.1` | | [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package) | `1` | `2` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `3` | `4` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `3` | `4` | Updates `actions/setup-python` from 4 to 5 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) Updates `pre-commit/action` from 3.0.0 to 3.0.1 - [Release notes](https://github.com/pre-commit/action/releases) - [Commits](https://github.com/pre-commit/action/compare/v3.0.0...v3.0.1) Updates `hynek/build-and-inspect-python-package` from 1 to 2 - [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases) - [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md) - [Commits](https://github.com/hynek/build-and-inspect-python-package/compare/v1...v2) Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) Updates `actions/upload-artifact` from 3 to 4 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: pre-commit/action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: hynek/build-and-inspect-python-package dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yml | 4 ++-- .github/workflows/pypi-package.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 85097631..88c0c7cb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.x" - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index bd704b5f..c7acc055 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: hynek/build-and-inspect-python-package@v1 + - uses: hynek/build-and-inspect-python-package@v2 # Upload to real PyPI on GitHub Releases. release-pypi: @@ -38,7 +38,7 @@ jobs: steps: - name: Download packages built by build-and-inspect-python-package - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Packages path: dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9407ac7e..df0dc488 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: branch: ["origin/main", "3.12", "3.11", "3.10", "3.9", "3.8"] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3 allow-prereleases: true @@ -44,7 +44,7 @@ jobs: run: | cat ./logs/docsbuild.log - name: Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: doc-html path: www/ From 40e175bb1fc9b1c8df915a4d129c6473e5551498 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:52:44 +0200 Subject: [PATCH 18/84] Include name in artifact name to work with actions/upload-artifact@v4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df0dc488..2187fb1b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,5 +46,5 @@ jobs: - name: Upload uses: actions/upload-artifact@v4 with: - name: doc-html + name: doc-html-${{ matrix.branch }} path: www/ From 21ff0a2a3d3beb3de0f9caeded87ea27a128c3df Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 6 Nov 2023 15:09:14 +0200 Subject: [PATCH 19/84] Use system font stack --- python_docs_theme/static/pydoctheme.css | 6 +++--- python_docs_theme/theme.conf | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 87a06293..36a6ed90 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -170,7 +170,7 @@ div.sphinxsidebar a:hover { form.inline-search input, div.sphinxsidebar input, div.related input { - font-family: 'Lucida Grande', Arial, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; border: 1px solid #999999; font-size: smaller; border-radius: 3px; @@ -258,7 +258,7 @@ div.body a:hover { } tt, code, pre { - font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", Menlo, Monaco, Consolas, monospace; + font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; font-size: 96.5%; } @@ -362,7 +362,7 @@ div.genindex-jumpbox a { top: 0; right: 0; text-size: 75%; - font-family: monospace; + font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; padding-left: 0.2em; padding-right: 0.2em; border-radius: 0 3px 0 0; diff --git a/python_docs_theme/theme.conf b/python_docs_theme/theme.conf index 1fbcabc1..5edf397a 100644 --- a/python_docs_theme/theme.conf +++ b/python_docs_theme/theme.conf @@ -5,8 +5,8 @@ pygments_style = default pygments_dark_style = monokai [options] -bodyfont = 'Lucida Grande', Arial, sans-serif -headfont = 'Lucida Grande', Arial, sans-serif +bodyfont = -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif +headfont = -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif footerbgcolor = white footertextcolor = #555555 relbarbgcolor = white From 6f35188e577d26e1a4e937e2dbc28c19eba36065 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 16 Mar 2024 11:49:00 +0200 Subject: [PATCH 20/84] Don't test theme on 3.8 and 3.9 branches --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2187fb1b..1b58d3ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - branch: ["origin/main", "3.12", "3.11", "3.10", "3.9", "3.8"] + branch: ["origin/main", "3.12", "3.11", "3.10"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 From 10918c3463dad7fab22d3ad6237166e7d53aa973 Mon Sep 17 00:00:00 2001 From: Kerim Kabirov Date: Sun, 17 Mar 2024 19:39:19 +0100 Subject: [PATCH 21/84] Remove incorrect CSS property --- python_docs_theme/static/pydoctheme.css | 1 - 1 file changed, 1 deletion(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 36a6ed90..39c4e333 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -361,7 +361,6 @@ div.genindex-jumpbox a { position: absolute; top: 0; right: 0; - text-size: 75%; font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; padding-left: 0.2em; padding-right: 0.2em; From d9136c620f90fbbb990d50c4ac8ad122fb54b2c8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:27:07 +0200 Subject: [PATCH 22/84] Prepare 2024.3 release --- CHANGELOG.rst | 10 +++++++++- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0b02c3f6..07f7d4c7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,14 @@ Changelog ========= +`2024.3 `_ +---------------------------------------------------------------------------- + +- Modernise font: use system font stack to improve text readability and webpage performance (#174) + Contributed by Hugo van Kemenade +- Remove incorrect CSS property (#178) + Contributed by Kerim Kabirov + `2024.2 `_ ---------------------------------------------------------------------------- @@ -40,7 +48,7 @@ Changelog `2023.7 `_ ---------------------------------------------------------------------------- -- Fix compatability with Sphinx 7.1 (#137) +- Fix compatibility with Sphinx 7.1 (#137) Contributed by Pradyun Gedam - Enable the slash keypress to focus the search field (#141) Contributed by Mike Fiedler diff --git a/pyproject.toml b/pyproject.toml index 8fd838f3..fc5f5513 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ [project] name = "python-docs-theme" -version = "2024.2" +version = "2024.3" description = "The Sphinx theme for the CPython docs and related projects" readme = "README.rst" license.file = "LICENSE" From 95134919673c13112574ac50c1bc96ad1e6f2b33 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:40:05 +0200 Subject: [PATCH 23/84] Exclude bots from generated release notes --- .github/release.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..9d1e0987 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot + - pre-commit-ci From fe6a24363611175387dab379b6125d9190ffd7d4 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:43:38 +0200 Subject: [PATCH 24/84] Only show 'Last updated on ...' when last_updated defined --- python_docs_theme/layout.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python_docs_theme/layout.html b/python_docs_theme/layout.html index d387ef38..a661961a 100644 --- a/python_docs_theme/layout.html +++ b/python_docs_theme/layout.html @@ -149,7 +149,9 @@

{{ _('Navigation') }}

{% include "footerdonate.html" %}
- {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} + {%- if last_updated %} + {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} + {%- endif %} {% if theme_issues_url %}{% trans %}Found a bug?{% endtrans %}{% endif %}
From 5c6c0b4856b6c344591c6cb97a004e5db68f0b01 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:51:05 +0200 Subject: [PATCH 25/84] Add newlines to make if blocks clear --- python_docs_theme/layout.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/python_docs_theme/layout.html b/python_docs_theme/layout.html index a661961a..9762b06c 100644 --- a/python_docs_theme/layout.html +++ b/python_docs_theme/layout.html @@ -136,14 +136,24 @@

{{ _('Navigation') }}

{% block footer %}