Skip to content

Commit

Permalink
docs: improve RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jul 17, 2024
1 parent 7c9b31e commit 829c2ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-lts-latest
tools:
# Keep version in sync with tox.ini/docs and ci.yml/docs.
python: "3.12"
jobs:
# Need the tags to calculate the version (sometimes).
post_checkout:
- git fetch --tags

python:
install:
Expand Down
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# SPDX-License-Identifier: MIT

import os

from importlib import metadata
from pathlib import Path


# Set canonical URL from the Read the Docs Domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

# Tell Jinja2 templates the build is running on Read the Docs
if os.environ.get("READTHEDOCS", "") == "True":
html_context = {"READTHEDOCS": True}


# -- Path setup -----------------------------------------------------------

PROJECT_ROOT_DIR = Path(__file__).parents[1].resolve()
Expand Down

0 comments on commit 829c2ff

Please sign in to comment.