Skip to content

Updated image links at Kubernetes basic tutorial #51663

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

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

Nishant891
Copy link
Contributor

Description

Fixed incorrect double language prefix in Chinese Kubernetes tutorial navigation links. The tutorial module paths were manually including /zh-cn/ prefix, but Hugo was automatically adding the language prefix again based on the current page context, resulting in invalid URLs with /zh-cn/zh-cn/ double prefix.

Changes made:

  • Removed manual /zh-cn/ prefix from all tutorial module paths in the Chinese localization
  • Links now follow the same pattern as the English version, allowing Hugo to handle language prefixing automatically
  • All 6 tutorial modules updated: create cluster, deploy app, explore app, expose app, scale app, and update app

Issue

Closes #51643

Root cause: Hugo automatically prepends language-specific URL prefixes (/zh-cn/) when serving localized content. The manual inclusion of /zh-cn/ in the shortcode paths caused double prefixing, creating invalid URLs like:

  • Before: https://kubernetes.io/zh-cn/zh-cn/docs/tutorials/kubernetes-basics/...
  • After: https://kubernetes.io/zh-cn/docs/tutorials/kubernetes-basics/...

Related to the issue : [zh] Wrong links at Kubernetes basic tutorial kubernetes#51643

The path in the images earlier pointed to path="/zh-cn/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro/"  but /zh-cn was being added dynamically again so the result was path="/zh-cn/zh-cn/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro/" which is an invalid link.

Fix : removed /zh-cn from the path of all the images.
Copy link

linux-foundation-easycla bot commented Jul 20, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 20, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @Nishant891!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the area/localization General issues or PRs related to localization label Jul 20, 2025
@k8s-ci-robot k8s-ci-robot requested review from asa3311 and SataQiu July 20, 2025 05:16
@k8s-ci-robot k8s-ci-robot added language/zh Issues or PRs related to Chinese language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 20, 2025
Copy link

netlify bot commented Jul 20, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit f8e4418
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/687c7b9da1acce0008c4f78a
😎 Deploy Preview https://deploy-preview-51663--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@windsonsea windsonsea left a comment

Choose a reason for hiding this comment

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

The preview looks good.

Thanks for fixing those 404 links.

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2025
Copy link
Member

@ydFu ydFu left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: windsonsea, ydFu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 8928fb58bbd2698a0c860d199298d069821393e7

@k8s-ci-robot k8s-ci-robot merged commit 6f8f063 into kubernetes:main Jul 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/localization General issues or PRs related to localization cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/zh Issues or PRs related to Chinese language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[zh] Wrong links at Kubernetes basic tutorial
4 participants