-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Milestone
Description
Describe the bug
Using the dirhtml
builder results in pages with canonical links of the form
<link rel="canonical" href="https://www.url.com/search.html" />
for the index document _website/search/index.html
How to Reproduce
- Set html_baseurl
html_baseurl = 'https://www.url.com'
- Build documentation using dirhtml builder
sphinx-build -b dirhtml . _website/
Expected behavior
The canonical link has either the form
<link rel="canonical" href="https://www.url.com/search/" />
or
<link rel="canonical" href="https://www.url.com/search/index.html" />
Your project
Screenshots
No response
OS
Unix
Python version
3.9
Sphinx version
4.x
Sphinx extensions
No response
Extra tools
No response
Additional context
davidism, astrojuanlu, ailin-nemui, benjaoming, wpoely86 and 4 more