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

documentation: gh-pages canonical link #1550

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

Florent-Bouisset
Copy link
Collaborator

When searching through a search engine "RxPlayer documentation" the first results are from an old version 3.5.
The most referenced page for the documentation should be the current version e.g: https://developers.canal-plus.com/rx-player/doc/api/Overview.html

This PR add a tag link rel="canonical" in the metadata to inform that this page is duplicated.
https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls?hl=fr#rel-canonical-link-method
This tag is only used by search engine for referencing. So the documentation of all versions remains accessible with a direct URL.

Other documentation (such as react) do this: https://18.react.dev/ has <link rel="canonical" href="https://react.dev/">

From doc version 3.5 to 3.26, I have referenced to the equivalent page in current version:
Ex: https://developers.canal-plus.com/rx-player/versions/3.21.1/doc/pages/api/loadVideo_options.html => https://developers.canal-plus.com/rx-player/doc/api/Loading_a_Content.html

For pages that had no equivalent in current version, I have left them unchanged.

For doc version > 3.26, I have only referenced the page Welcome.html to the current one because there is a lot of pages in the new doc version, and that would have taken much more time.

@peaBerberian
Copy link
Collaborator

From reading about it, I'm under the impression that "canonical" means that the canonical link contains the exact same content, no?

Which would not be the case when someone legitimately visit the documentation for an older version.

Also if we ever changes URL in a newer version, we'll have to think about also updating all previous pages (the issue I see is not that doing the update is hard, it's that I'm sure we'll forget to do this), no?

@Florent-Bouisset
Copy link
Collaborator Author

From reading about it, I'm under the impression that "canonical" means that the canonical link contains the exact same content, no?

Which would not be the case when someone legitimately visit the documentation for an older version.

Also if we ever changes URL in a newer version, we'll have to think about also updating all previous pages (the issue I see is not that doing the update is hard, it's that I'm sure we'll forget to do this), no?

Whether the content IS the same is a bit ambiguous, if a version corrects spelling mistakes there is no point to consider it as a new content.
Anyway this is only an hint for the search engines, and they may ignore it if they found that the pages are different

@peaBerberian
Copy link
Collaborator

Whether the content IS the same is a bit ambiguous, if a version corrects spelling mistakes there is no point to consider it as a new content.

Yes it's ambiguous.

Anyway this is only an hint for the search engines, and they may ignore it if they found that the pages are different

But I'm under the impression that this is intended for another URL for the same content and this is working around this concept here.
E.g. if someone actually wanted the older version's documentation it could be redirected to the new one.

I'm not too comfortable lying to search engines that way, though react seems to do it, would be interesting to know why.

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.

2 participants