Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment adding a dynamic canonical URL to mkdocs #3

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ version: 2

mkdocs:
configuration: mkdocs.yml
fail_on_warning: true

# Optionally declare the Python requirements required to build your docs
python:
Expand Down
13 changes: 13 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
site_name: Basic MkDocs Example Project

# This setting is required for Canonical URLs.
# You can read more about why you should consider using this:
# https://docs.readthedocs.io/en/stable/canonical-urls.html
#
# Until https://github.com/readthedocs/readthedocs.org/issues/9781 is fixed,
# you need to define CUSTOM_CANONICAL_URL yourself as a workaround.
#
# For instance, navigate to Admin => Environment and define
# CUSTOM_CANONICAL_URL=https://SLUG.readthedocs.io/en/stable/
# (don't expose it to PRs, they publish on different URLs)
site_url: !ENV CUSTOM_CANONICAL_URL

theme:
name: readthedocs
highlightjs: true
Expand Down