Skip to content

Add permanent url for the latest Linkerd docs#2116

Merged
travisbeckham merged 6 commits into
mainfrom
travis/docs-redirect
May 14, 2026
Merged

Add permanent url for the latest Linkerd docs#2116
travisbeckham merged 6 commits into
mainfrom
travis/docs-redirect

Conversation

@travisbeckham
Copy link
Copy Markdown
Collaborator

@travisbeckham travisbeckham commented May 4, 2026

Overview

Add a permanent url for the latest Linkerd docs, making /docs/ a real url, and /{latestMajorVersion}/ a redirect.

For example, while 2.19 is the latest major version, linkerd.io/2.19/ will redirect to linkerd.io/docs/, but once 2.20 is released, linkerd.io/2.19/ would become an actual directory that is not indexed. Only linkerd.io/docs/ and linkerd.io/2-edge/ will be indexed.

With this change, we should not use the /2/ Cloudflare redirect in the content anymore, we can just use /docs/. We will leave the Cloudflare redirect in place for existing external links, but we should stop using it internally so our linting can check these links.

Current PR
Location of latest docs https://linkerd.io/{latestMajorVersion}/* https://linkerd.io/docs/*
"Getting Started" page redirect https://linkerd.io/docs/ https://linkerd.io/docs/, https://linkerd.io/{latestMajorVersion}/
"Overview" page redirect https://linkerd.io/{latestMajorVersion}/ none
Latest docs redirect https://linkerd.io/2/* https://linkerd.io/{latestMajorVersion}/*, https://linkerd.io/2/* (only used externally)

Even though this is a major change, all existing links internally and externally should continue to work.

This change was motivated by comments in issue #1849.

High-level Changes

  • All of the latest docs are moved to content/docs/.

  • An alias is automatically generated for every page in the latest docs. E.g.: linkerd.io/2.19/reference redirects to linkerd.io/docs/reference

  • All older versions of docs are in directories named by their version (same as today), and now have a noindex meta tag set. E.g.: linkerd.io/2.18, linkerd.io/2.17, etc

  • Docs images have been moved to the static directory

  • All internal links that used the Cloudflare /2/ redirect have been updated to point to /docs/, except links that are part of CLI output.

  • Each version (linkerd.io/docs, linkerd.io/2.17, etc) now redirects to the Getting Started page, instead of Overview.

  • After this change is merged, the Cloudflare /2/ redirect should be updated to point to /docs/, which means we will not have to update this anymore where there's a new major version 🎉.

Preview links

Question for reviewers

  • This PR adds the noindex meta tag to older versions of the docs, so only linkerd.io/docs/ and linkerd.io/2-edge/ will be indexed (Currently, older versions do not show up in sitemap.xml). Do we want to do this?
  • Do we want to add the noindex meta tag to 2-edge docs too, so only linkerd.io/docs/ is indexed?

Signed-off-by: Travis Beckham <travis@buoyant.io>
Signed-off-by: Travis Beckham <travis@buoyant.io>
Signed-off-by: Travis Beckham <travis@buoyant.io>
Signed-off-by: Travis Beckham <travis@buoyant.io>
@travisbeckham travisbeckham requested review from kflynn and wmorgan May 4, 2026 21:45
Signed-off-by: Travis Beckham <travis@buoyant.io>
Comment thread linkerd.io/README.md
Comment thread linkerd.io/README.md
- Click on the `Rules`section
- Update the rule `https://linkerd.io/2/*` so that it points to
`https://linkerd.io/2.19/$1`
- Push, and hold the merge till after `2.20` is out.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a step we need in here to make the per-file 2.20 -> docs redirects? Or is that only needed as a one-time thing for 2.19?

Copy link
Copy Markdown
Collaborator Author

@travisbeckham travisbeckham May 6, 2026

Choose a reason for hiding this comment

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

All of the {latestVersion} -> docs redirects are generated at build time. You can see this in alias-latest-docs.html‎

(or am I not understanding your question?)

Signed-off-by: Travis Beckham <travis@buoyant.io>
@kflynn
Copy link
Copy Markdown
Member

kflynn commented May 13, 2026

D'oh! I thought I'd approved this. I personally think it makes sense to index only the latest version and not older versions or the edge docs, but I'll defer to Willam's opinion there.

Copy link
Copy Markdown
Member

@kflynn kflynn 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 from here! 🙂

@travisbeckham
Copy link
Copy Markdown
Collaborator Author

travisbeckham commented May 13, 2026

I personally think it makes sense to index only the latest version and not older versions or the edge docs, but I'll defer to Willam's opinion there.

@wmorgan could you give approval on the overall effect of these changes? (Do we want a permanent location for the latest docs, etc.)

And could I get you to weigh in on these 2 questions?

  1. This PR adds the noindex meta tag to older versions of the docs, so only linkerd.io/docs/ and linkerd.io/2-edge/ will be indexed (Currently, older versions do not show up in sitemap.xml). Do we want to do this?
  2. Do we also want to add the noindex meta tag to 2-edge docs, so only linkerd.io/docs/ is indexed?

@wmorgan
Copy link
Copy Markdown
Member

wmorgan commented May 13, 2026

  1. This PR adds the noindex meta tag to older version of the docs, so only linkerd.io/docs/ and linkerd.io/2-edge/ will be indexed (Currently, older versions do not show up in sitemap.xml). Do we want to do this?
  2. Do we also want to add the noindex meta tag to 2-edge docs, so only linkerd.io/docs/ are indexed?

I think indexing both /docs/ and /2-edge/ (which may have newer content) makes sense. Let's start with that. If it ends up confusing we can revisit.

@travisbeckham travisbeckham merged commit 62aea26 into main May 14, 2026
7 checks passed
@travisbeckham travisbeckham deleted the travis/docs-redirect branch May 14, 2026 13:54
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.

3 participants