Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 1a0de42

Browse files
docs: set site_url to fix broken 404 page on RTD (#1325)
### 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. --------- Co-authored-by: megalinter-bot <[email protected]>
1 parent 14b2d93 commit 1a0de42

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

mkdocs.yml

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

57
nav:
68
- Home:

readthedocs.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ build:
44
os: ubuntu-22.04
55
tools:
66
python: '3.10'
7+
commands:
8+
- python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
9+
- python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
10+
- cat mkdocs.yml
11+
- mkdocs build --clean --site-dir $READTHEDOCS_OUTPUT/html --config-file mkdocs.yml
712

813
mkdocs:
914
configuration: mkdocs.yml
10-
11-
python:
12-
install:
13-
- requirements: docs/requirements.txt
15+
# Once https://github.com/readthedocs/readthedocs.org/issues/8529 is fixed, replace the commands above with the
16+
# following to use the default RTD build steps again:
17+
#python:
18+
# install:
19+
# - requirements: docs/requirements.txt

0 commit comments

Comments
 (0)