-
Notifications
You must be signed in to change notification settings - Fork 697
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
Missing canonical link in the default theme #2550
Comments
This should probably only be emitted if sitemapBaseUrl is set, since otherwise it'd result in a lie... it feels off to me to use this option for emitting that, but it's not necessarily wrong... just weird... According to that Google page, it sounds like the sitemap should also include If doing this... we probably ought to also add a check to handle pages which render as |
Maybe we can rename |
I think |
Also add canonical link to index.html when set. Resolves #2550
Fixed with TypeDoc 0.26, which is releasing 2024/06/21 |
Search terms
default theme, canonical link
Expected Behavior
Index page generated by typedoc should include a rel canonical link.
Actual Behavior
Index page generated with the default theme does not have it.
Explanation
A rel canonical link informs a search engines that which page is the canonical page, i.e., the page that users should use. For example, the following two URLs have the exactly the same content:
A user can read the content by visiting either the of the URLs above. However, it is better for search engine to only index one of them so that the search results would be consistent and avoids content duplication in search results (while Search Engines also do some guesswork, they are not reliable and would punish the websites that do not mark canonical pages properly). By including a rel canonical link in the index page, search engines would understand the relationship between the two pages:
The link does not have any effects to human visitors; they are only there for search engines.
(I'm getting a ton of warnings from Google Search Console)
The text was updated successfully, but these errors were encountered: