Skip to content

Commit de04e2a

Browse files
authored
docs: set site_url to fix broken 404 page on RTD (#176)
Closes #443 ### Summary of Changes The 404 page was previously not properly rendered on Read the Docs (RTD). This PR overrides the build commands of RTD. While this makes the 404 page work properly, it also removes the RTD flyout to select a version. For now, however, we deem the 404 page as more essential. Once readthedocs/readthedocs.org#8529 is done, we can use the default build again to make everything work as expected.
1 parent 44005f4 commit de04e2a

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
site_name: Safe-DS Python Library
22
repo_url: https://github.com/Safe-DS/Stdlib
33
repo_name: Safe-DS/Stdlib
4+
edit_uri: edit/main/docs/
5+
site_url: !ENV READTHEDOCS_CANONICAL_URL
46

57
nav:
68
- Home:

readthedocs.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ build:
44
os: ubuntu-22.04
55
tools:
66
python: '3.10'
7-
jobs:
8-
# https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry
9-
post_create_environment:
10-
- pip install poetry
11-
- poetry config virtualenvs.create false
12-
post_install:
13-
- poetry install --with docs
7+
commands:
8+
- pip install poetry
9+
- poetry config virtualenvs.create false
10+
- poetry install --with docs
11+
- cat mkdocs.yml
12+
- mkdocs build --clean --site-dir $READTHEDOCS_OUTPUT/html --config-file mkdocs.yml
13+
# Once https://github.com/readthedocs/readthedocs.org/issues/8529 is fixed, replace the commands above with the
14+
# following to use the default RTD build steps again:
15+
# jobs:
16+
# # https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry
17+
# post_create_environment:
18+
# - pip install poetry
19+
# - poetry config virtualenvs.create false
20+
# post_install:
21+
# - poetry install --with docs
1422

1523
mkdocs:
1624
configuration: mkdocs.yml

0 commit comments

Comments
 (0)