Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Experiment adding a dynamic canonical URL to mkdocs
  • Loading branch information
benjaoming committed Dec 7, 2022
commit 44c7cc6971d8811f50e312f4e9560284676a66c1
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ version: 2
# tools:
# python: "3.10"

# This pattern will be supported by a better environment variable, proposed
# here: TBD
build:
os: ubuntu-22.04
tools:
python: "3.10"
jobs:
pre_build:
- export "MKDOCS_SITE_URL=$READTHEDOCS_PROJECT"

mkdocs:
configuration: mkdocs.yml
fail_on_warning: true

# Optionally declare the Python requirements required to build your docs
python:
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
site_name: Basic MkDocs Example Project
site_url: !ENV MKDOCS_SITE_URL
theme:
name: readthedocs
highlightjs: true
Expand Down