Details
-
Type:
Story
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: Stack Documentation and UX
-
Labels:None
-
Epic Link:
-
Team:SQuaRE
-
Urgent?:No
Description
By setting a canonical URL for pages delivered by LSST the Docs, we can ensure that search engines consolidate rankings for the same page on different editions (served by different /v prefixes.
See https://support.google.com/webmasters/answer/139066?hl=en
The best way to do that is at the CDN level, in Fastly, to set HTTP headers.
Behavior notes:
- The canonical URL should always correspond to the main edition. So strip the /v/ and /builds/ prefixes.
- URLs for directories should end with / and ideally strip off the index.html. So it'll be https://pipelines.lsst.io/ rather than https://pipelines.lsst.io/index.html. This approach is also compatible with how Gatsby apps work. It'll also be compatible with Sphinx's directory-based HTML builder (https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.dirhtml.DirectoryHTMLBuilder)