Skip to content

Deprecate canonical_url in favor of html_baseurl#178

Merged
AA-Turner merged 2 commits intosphinx-doc:masterfrom
stsewd:use-html-baseurl
Jan 8, 2024
Merged

Deprecate canonical_url in favor of html_baseurl#178
AA-Turner merged 2 commits intosphinx-doc:masterfrom
stsewd:use-html-baseurl

Conversation

@stsewd
Copy link
Copy Markdown
Contributor

@stsewd stsewd commented Apr 28, 2021

Rely on html_baseurl for the canonical url instead.
The canonical url is already set in the basic theme

https://github.com/sphinx-doc/sphinx/blob/4e9d1553968653df6699b20afc22b73eb3280185/sphinx/themes/basic/layout.html#L130-L132

That takes into account pages using the dirhtml builder
instead of always adding the html extension.
This was introduced in sphinx 1.8.

Rely on html_baseurl for the canonical url instead.
The canonical url is already set in the basic theme

https://github.com/sphinx-doc/sphinx/blob/4e9d1553968653df6699b20afc22b73eb3280185/sphinx/themes/basic/layout.html#L130-L132

That takes into account pages using the dirhtml builder
instead of always adding the `html` extension.
This was introduced in sphinx 1.8.
@bitprophet bitprophet deleted the branch sphinx-doc:master January 13, 2023 00:42
@bitprophet bitprophet closed this Jan 13, 2023
@AA-Turner AA-Turner reopened this Jan 8, 2024
# Conflicts:
#	alabaster/layout.html
@AA-Turner AA-Turner merged commit b9e8d79 into sphinx-doc:master Jan 8, 2024
@stsewd stsewd deleted the use-html-baseurl branch January 8, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants