Skip to content

Canonical Links Best Practice #1238

@markhildreth

Description

@markhildreth

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
    • which 302s to /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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions