[ https://issues.apache.org/jira/browse/FLINK-9806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553000#comment-16553000 ]
ASF GitHub Bot commented on FLINK-9806: --------------------------------------- GitHub user patricklucas opened a pull request: https://github.com/apache/flink/pull/6396 [FLINK-9806][docs] Add canonical link element to docs ## What is the purpose of the change Flink's documentation's SEO is a mess, with web searches often returning results from many Flink versions, usually with the latest not at the top. This change adds an HTML `link` tag with `rel="canonical"` to indicate to crawlers where to find the latest version of the page, i.e. served from `//ci.apache.org/projects/flink/flink-docs-stable/`. ## Brief change log - Update Docker image for building the docs to support the required ruby version - Add value to the docs config file to indicate the "stable" base URL - Add a `link` element with `rel="canonical"` to the base template so each page includes it with the appropriate value ## Notes Once this has been merged, we should port this change to the release branches whose docs are still available. You can merge this pull request into a Git repository by running: $ git pull https://github.com/patricklucas/flink FLINK-9806_docs_canonical_url Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/6396.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #6396 ---- commit 2fec8ceafcb02d2024ab269c775418311661c9a3 Author: Patrick Lucas <me@...> Date: 2018-07-23T14:24:08Z Use fedora for Docker docs build for newer Ruby The docs require Ruby >= 2.1.0 which isn't shipped by CentOS 7. It is available in Fedora 28, however, and I don't see any harm in switching to it. commit ff42e8a65ce0304ce194d3761aad446d16667eee Author: Patrick Lucas <me@...> Date: 2018-07-23T15:17:14Z Add rel=canonical link to all pages ---- > Add a canonical link element to documentation HTML > -------------------------------------------------- > > Key: FLINK-9806 > URL: https://issues.apache.org/jira/browse/FLINK-9806 > Project: Flink > Issue Type: Improvement > Components: Documentation > Affects Versions: 1.5.0 > Reporter: Patrick Lucas > Priority: Major > Labels: pull-request-available > > Flink has suffered for a while with non-optimal SEO for its documentation, > meaning a web search for a topic covered in the documentation often produces > results for many versions of Flink, even preferring older versions since > those pages have been around for longer. > Using a canonical link element (see references) may alleviate this by > informing search engines about where to find the latest documentation (i.e. > pages hosted under [https://ci.apache.org/projects/flink/flink-docs-master/).] > I think this is at least worth experimenting with, and if it doesn't cause > problems, even backporting it to the older release branches to eventually > clean up the Flink docs' SEO andĀ converge on advertising only the latest docs > (unless a specific version is specified). > References: > * [https://moz.com/learn/seo/canonicalization] > * [https://yoast.com/rel-canonical/] > * [https://support.google.com/webmasters/answer/139066?hl=en] > * [https://en.wikipedia.org/wiki/Canonical_link_element] -- This message was sent by Atlassian JIRA (v7.6.3#76005)