diff --git a/packages/sphinx-codelinks/docs/changelog.rst b/packages/sphinx-codelinks/docs/changelog.rst index 21fac1dcf..f0b883e9b 100644 --- a/packages/sphinx-codelinks/docs/changelog.rst +++ b/packages/sphinx-codelinks/docs/changelog.rst @@ -28,10 +28,8 @@ New and Improved *Package* dropdown with ``sphinx-codelinks`` among its options, and issues and pull requests concerning this package get a ``pkg: sphinx-codelinks`` label. Old issue URLs redirect. - - **The documentation** (in progress): https://codelinks.useblocks.com stays the address. - It is served by GitHub Pages from the old repository until the Read the Docs project - and the DNS move are done, and by Read the Docs afterwards; nothing changes for a - reader of that URL. + - **The documentation** (done): https://codelinks.useblocks.com stays the address, and + Read the Docs now builds and serves it from this repository. - **The old repository** will be archived rather than deleted, so every permalink and every ``git+https://…/sphinx-codelinks.git@`` pin keeps resolving. Repositories pinning ``@main`` will stop receiving updates and should re-point at PyPI or at diff --git a/packages/sphinx-codelinks/docs/conf.py b/packages/sphinx-codelinks/docs/conf.py index 5500c3be7..152b087b7 100644 --- a/packages/sphinx-codelinks/docs/conf.py +++ b/packages/sphinx-codelinks/docs/conf.py @@ -6,6 +6,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os import tomllib from datetime import datetime from pathlib import Path @@ -82,6 +83,10 @@ } html_context = {"repository": "useblocks/sphinx-needs"} html_css_files = ["furo.css"] +# Read the Docs passes every build the address it serves that version from, custom domain +# included, and Sphinx writes a `` into every page from it. Outside +# Read the Docs the variable is unset, and an empty base URL writes no canonical link. +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") # Sphinx-Needs configuration needs_from_toml = "ubproject.toml" diff --git a/packages/sphinx-mounts/docs/conf.py b/packages/sphinx-mounts/docs/conf.py index 7f99c1ace..0377fbc0d 100644 --- a/packages/sphinx-mounts/docs/conf.py +++ b/packages/sphinx-mounts/docs/conf.py @@ -1,5 +1,6 @@ """Sphinx configuration for the sphinx-mounts docs.""" +import os import tomllib from datetime import datetime from pathlib import Path @@ -54,6 +55,10 @@ } html_context = {"repository": "useblocks/sphinx-needs"} html_css_files = ["furo.css"] +# Read the Docs passes every build the address it serves that version from, custom domain +# included, and Sphinx writes a `` into every page from it. Outside +# Read the Docs the variable is unset, and an empty base URL writes no canonical link. +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") # Named hyperlink targets for sibling useblocks projects. Defined once # here (appended to every RST source via ``rst_epilog``) so the URLs are