diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..6cd5452 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: 2024 Jeff Epler +# +# SPDX-License-Identifier: GPL-3.0-only + +version: 2 + +build: + os: ubuntu-lts-latest + tools: + python: "3" + +sphinx: + configuration: docs/conf.py + +python: + install: + - requirements: requirements-dev.txt diff --git a/docs/conf.py b/docs/conf.py index f2892e2..6daed56 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,6 +17,13 @@ import sys sys.path.insert(0, os.path.abspath('.')) +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +html_context = {} +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True # -- Project information -----------------------------------------------------