Skip to content

Commit de0e4c0

Browse files
committed
Experiment adding a dynamic canonical URL to mkdocs
1 parent 4621a97 commit de0e4c0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.readthedocs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@ version: 2
1111
# tools:
1212
# python: "3.10"
1313

14+
# This pattern will be supported by a better environment variable, proposed
15+
# here: TBD
16+
build:
17+
jobs:
18+
post_build:
19+
- export "MKDOCS_SITE_URL=$READTHEDOCS_PROJECT"
20+
1421
mkdocs:
1522
configuration: mkdocs.yml
23+
fail_on_warning: true
1624

1725
# Optionally declare the Python requirements required to build your docs
1826
python:

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
site_name: Basic MkDocs Example Project
2+
site_url: !ENV MKDOCS_SITE_URL
23
theme:
34
name: readthedocs
45
highlightjs: true

0 commit comments

Comments
 (0)