Skip to content
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

SEO enhancements / requests #137

Closed
MiloCasagrande opened this issue Oct 22, 2020 · 5 comments
Closed

SEO enhancements / requests #137

MiloCasagrande opened this issue Oct 22, 2020 · 5 comments
Assignees

Comments

@MiloCasagrande
Copy link
Member

We've been asked to look into some SEO enhancements after a few crawls of our websites have been performed and SEO-related issues have been detected.

I tried to look into solving some of those, but I have no idea how to achieve that with Sphinx (or if it's even possible).

The issues we should try to fix are:

  • Missing canonical link in each page
    Pages like this can also be accessed and indexed without the trailing index.html (here) and should contain a canonical link (ideally to the one without the index.html) or search engines will consider the content as duplicate, and index it twice. I looked into Sphinx docs, but could not find an easy solution without having to hack the Sphinx theme.
  • Missing publisher, author, datePublished (and possibly others) tags in each page
    I'm not even sure if we can or want to fix those. These are parts of what Google call structured data and results in higher page rankings, better search results etc.... I know what needs to be added to the pages, I have no idea how to achieve that with Sphinx.
@MiloCasagrande
Copy link
Member Author

@MatthewCroughan I'm assigning this to you since you probably hacked the most the docs and Sphinx, so any inputs/insights is welcome.

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented Nov 26, 2020

I believe this is the right config option for our theme. Though if we were ever to change the theme, we'd have to re-investigate this option. It's interesting that the theme has control over how the canonical url is presented. A mistake in the architecture of Sphinx probably. I will look into this after I have solved the higher priority tasks.

https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html#confval-canonical_url

@MiloCasagrande
Copy link
Member Author

https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html#confval-canonical_url

Yeah, that was my finding as well, but as far as I understood that setting only works for the root url (the homepage), and we need it for all pages.

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented Nov 26, 2020

For as long as we use the RTD theme, I do not think structured data is possible today.

readthedocs/readthedocs.org#5208

MatthewCroughan added a commit that referenced this issue Nov 27, 2020
Signed-off-by: Matthew Croughan <[email protected]>
@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented Nov 27, 2020

This should be fixed by a8eabcd

This comment turned out to be correct. #137 (comment)

As can be seen by a grep, each page now has a unique canonical url that points to index.html, which I believe is what we want:

matthew@thinkpad ~/git/foundries/docs/build/html (improvements-05) $ grep -r '<link rel="canonical"'
reference-manual/factory/fioctl/fioctl.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/factory/fioctl/fioctl.html"/>
reference-manual/factory/fioctl/index.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/factory/fioctl/index.html"/>
reference-manual/factory/factory-sources.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/factory/factory-sources.html"/>
reference-manual/factory/api-access.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/factory/api-access.html"/>
reference-manual/factory/factory-definition.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/factory/factory-definition.html"/>
reference-manual/factory/factory.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/factory/factory.html"/>
reference-manual/linux/linux-update.html:    <link rel="canonical" href="https://docs.foundries.io/reference-manual/linux/linux-update.html"/>

MatthewCroughan added a commit that referenced this issue Dec 7, 2020
Signed-off-by: Matthew Croughan <[email protected]>
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

No branches or pull requests

2 participants