Skip to content

DOC: Canonical_urls#17210

Merged
mattip merged 3 commits intonumpy:masterfrom
susan-shu-c:canonical_urls
Sep 1, 2020
Merged

DOC: Canonical_urls#17210
mattip merged 3 commits intonumpy:masterfrom
susan-shu-c:canonical_urls

Conversation

@susan-shu-c
Copy link
Copy Markdown
Contributor

@susan-shu-c susan-shu-c commented Sep 1, 2020

Resolves #17069 adding canonical urls to the header of docs.

I have tested it locally which adds the canonical url in the generated .html files.
The indentation I used in layout.html is so that the generated ones line up (see last line of screenshot).
numpy_pr

A similar way that the folks at Sphinx did it: link to merged PR
I opted not to use the {% block linktags %} they used due to unexpected behavior (the href is generated correctly, but duplicated) when building in numpy.

@susan-shu-c susan-shu-c changed the title DOC: Canonical_urls #17069 DOC: Canonical_urls Sep 1, 2020
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, this appears to match what sphinx themselves did https://github.com/sphinx-doc/sphinx/pull/4764/files.

Let's check the doc build when CI finishes to see that the links are valid, but otherwise should be good to merge.

@eric-wieser
Copy link
Copy Markdown
Member

@mattip mattip merged commit db86687 into numpy:master Sep 1, 2020
@mattip
Copy link
Copy Markdown
Member

mattip commented Sep 1, 2020

Thanks @susan-shu-c

@susan-shu-c
Copy link
Copy Markdown
Contributor Author

Awesome, thanks @eric-wieser and @mattip for looking over this.

The docs to get started and build the docs are very clear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Html docs need canonical URLs

3 participants