-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Canonical Links Best Practice #1238
Comments
I think it would probably use useful to have a canonical link. Would probably need to add a (Note, also briefly discussed adding site-url at #1221 (comment)) |
@ehuss Thanks for the quick response. Based on your response and some more digging, I see a few ways forward: 1.) Expose the rendered path (e.g.,
A bit hackish (especially with the "who is supposed to add the slash" confusion), but it works. 2.) In addition to the above, expose a You mention a |
Hello, I changed the domain name of a website generated by mdBook Now, Google doesn't want to index the new URL because it is detected as duplicate content
Is there currently a solution ? (Even if it's a bit hacky) |
Is there a recommended practice for ensuring canonical URLs for a book? For example, the current rust book can be found at these URLs:
https://doc.rust-lang.org/book/
https://doc.rust-lang.org/book
/doc/stable/book/
and then/stable/book/
.https://doc.rust-lang.org/book/index.html
https://doc.rust-lang.org/book/title-page.html
(although this one is slightly different, in that the title page section in the ToC is styled as "active").However, I don't notice a
<link rel="canonical" href="https://doc.rust-lang.org/book/">
on any of the resulting documents. Should mdbook offer any recommendations in this regard, and/or a configuration option to allow for a canonical link on pages?The text was updated successfully, but these errors were encountered: