-
Notifications
You must be signed in to change notification settings - Fork 35
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
Don't set "canonical" URL twice? #83
Closed
Labels
Comments
Any comments on this? This might become more relevant if and when the Open Graph Protocol will be supported (see sphinx-doc/sphinx#7974). |
I'll see if I can put this one into our roadmap |
Any news on this? |
I was thinking to take a look at this today :D |
stsewd
added a commit
to readthedocs/readthedocs.org
that referenced
this issue
Oct 6, 2020
stsewd
added a commit
that referenced
this issue
Oct 6, 2020
Fix #82 Ref #83 We need to release the extension first, make sure all builds are using that version and then release readthedocs/readthedocs.org#7540
stsewd
added a commit
that referenced
this issue
Oct 6, 2020
Fix #82 Ref #83 We need to release the extension first, make sure all builds are using that version and then release readthedocs/readthedocs.org#7540
stsewd
added a commit
to readthedocs/readthedocs.org
that referenced
this issue
Dec 3, 2020
stsewd
added a commit
to readthedocs/readthedocs.org
that referenced
this issue
Jan 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since Sphinx 1.8, there is
html_baseurl
: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurlThis is used to set the "canonical" URL of the page.
I think
readthedocs-sphinx-ext
should check for this and, if specified, not emit the "canonical" url a second time.An example illustrating the problem is the Sphinx homepage itself https://www.sphinx-doc.org/en/master/.
In line 19, the HTML source contains:
And a bit further down, starting with line 65, those lines appear:
I'm not sure what the consequences of two "canonical" urls are.
Interestingly, the two URLs are not even the same!
This happens only on the "index" page, though, on other pages the URLs are identical.
I don't know if any of this matters, but I guess it would be better to have only one "canonical" URL, right?
BTW, the URL should be escaped, see #82.
The text was updated successfully, but these errors were encountered: