Skip to content

Add ability to specify canonical URLs for pages #2357

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

Closed
gtback opened this issue Jan 19, 2022 · 0 comments · Fixed by #2373
Closed

Add ability to specify canonical URLs for pages #2357

gtback opened this issue Jan 19, 2022 · 0 comments · Fixed by #2373
Assignees
Labels
asciidoc Asciidoc and our Asciidoctor extensions enhancement Something we'd like to improve

Comments

@gtback
Copy link
Member

gtback commented Jan 19, 2022

There are times when a particular page has high SEO relevance, but we want to encourage search engines to return a different page instead. We can do this by adding a <link rel="canonical" ... element to the document <head> (driven by a Asciidoc attribute with the canonical URL). When implementing this, we'll have to be careful to respect chunking, as we only want the URL to be applied to a single page, not subsequent chunks/pages in the same book.

@gtback gtback added enhancement Something we'd like to improve asciidoc Asciidoc and our Asciidoctor extensions labels Jan 19, 2022
@gtback gtback self-assigned this Jan 19, 2022
gtback added a commit that referenced this issue Feb 9, 2022
By adding a `canonical-url` attribute to a section, the chunked HTML
page for that section will contain a `<link rel="canonical" ...>` tag in
the page header. This tag does not get included in later chunks of the
same input document.

Fixes #2357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asciidoc Asciidoc and our Asciidoctor extensions enhancement Something we'd like to improve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant