Skip to content

Commit

Permalink
Experiment adding a dynamic canonical URL to mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaoming committed Dec 7, 2022
1 parent 4621a97 commit e9fecf4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ version: 2
# tools:
# python: "3.10"

# This pattern will be supported by a better environment variable, proposed
# here: TBD
build:
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

0 comments on commit e9fecf4

Please sign in to comment.