From 7ce60134bcc0c49b043becc23d85f342445d3313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Tue, 6 Feb 2024 14:59:02 +0100 Subject: [PATCH] build: Restore official Read the Docs theme https://yamllint.readthedocs.io/en/v1.34.0/ was rendered differently than previous versions, very probably due to change of commit ca7f8b9 "Migrate to use .readthedocs.yaml for docs generation". Let's restore the `sphinx_rtd_theme` theme. --- .github/workflows/ci.yaml | 3 ++- .readthedocs.yaml | 5 ++++- docs/conf.py | 4 ++-- docs/requirements.txt | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 docs/requirements.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 780831e9..7e55e6ad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 - run: - pip install flake8 flake8-import-order sphinx rstcheck[sphinx] doc8 + pip install flake8 flake8-import-order sphinx sphinx_rtd_theme + rstcheck[sphinx] doc8 - run: pip install . - run: flake8 . - run: doc8 $(git ls-files '*.rst') diff --git a/.readthedocs.yaml b/.readthedocs.yaml index fe9f594b..4d6a2546 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,6 +3,9 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.12" sphinx: configuration: docs/conf.py +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index 9181df25..8a03b2fb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,12 +6,12 @@ from unittest.mock import MagicMock sys.path.insert(0, os.path.abspath('..')) - from yamllint import __copyright__, APP_NAME, APP_VERSION # noqa: I001, E402 # -- General configuration ------------------------------------------------ extensions = [ + 'sphinx_rtd_theme', 'sphinx.ext.autodoc', ] @@ -29,7 +29,7 @@ # -- Options for HTML output ---------------------------------------------- -html_theme = 'default' +html_theme = 'sphinx_rtd_theme' htmlhelp_basename = 'yamllintdoc' diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..f5a35649 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx-rtd-theme >=2.0.0