Fix pt br kubectl cheatsheet redirect - #57274
Open
Kavyanjana wants to merge 3 commits into
Open
Conversation
The English kubectl cheat sheet page was renamed from /docs/reference/kubectl/cheatsheet/ to /docs/reference/kubectl/quick-reference/. The pt-br quick-reference page was missing an alias for the old cheatsheet path, causing the language switcher to redirect to the homepage instead of the correct page when switching from pt-br to English. Add aliases: [/pt-br/docs/reference/kubectl/cheatsheet/] to the pt-br quick-reference front matter so the old URL correctly redirects to the new page.
The English kubectl cheat sheet was renamed from cheatsheet to quick-reference. The pt-br page still lives at cheatsheet.md, causing the language switcher to find no English translation (it looks for en/cheatsheet.md which no longer exists) and fall back to the homepage. Add translationKey: kubectl-quick-reference to both en/quick-reference.md and pt-br/cheatsheet.md so Hugo links them as translations of each other. The language switcher will now correctly link from /pt-br/docs/reference/kubectl/cheatsheet/ to /docs/reference/kubectl/quick-reference/ instead of the homepage.
The English kubectl cheat sheet page was renamed from cheatsheet to quick-reference. Locales that still use cheatsheet.md (de, fr, id, ja, ko, pt-br, ru, vi) lost their translation link to the English page, causing the language switcher to redirect to the homepage instead of the correct page. Add translationKey: kubectl-quick-reference to all cheatsheet.md and quick-reference.md files across all locales (de, en, fr, id, ja, ko, pt-br, ru, vi, zh-cn) so Hugo correctly links all of them as translations of each other, regardless of whether the locale uses the cheatsheet or quick-reference filename.
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
Author
|
I have tested this in my local. |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
注册 for free
to join this conversation on GitHub.
Already have an account?
登录 to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #56512
Added translationKey: kubectl-quick-reference to the front matter of all cheatsheet and quick-reference pages across all locales
pt-br/pt-br/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/de/de/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/id/id/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/ja/ja/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/ko/ko/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/ru/ru/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/vi/vi/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/fr/fr/docs/reference/kubectl/cheatsheet//docs/reference/kubectl/quick-reference/en/docs/reference/kubectl/quick-reference//ja/docs/reference/kubectl/cheatsheet/en/docs/reference/kubectl/quick-reference//ko/docs/reference/kubectl/cheatsheet/en/docs/reference/kubectl/quick-reference//de/docs/reference/kubectl/cheatsheet/zh-cn/zh-cn/docs/reference/kubectl/quick-reference//ja/docs/reference/kubectl/cheatsheet/Description
Issue
Closes: #
Description
Issue
Closes: #