Skip to content

[hotfix] [docs] Fix broken flink-training links in hands-on section#27746

Open
kylerballiet wants to merge 1 commit intoapache:masterfrom
kylerballiet:fix-docs-broken-links
Open

[hotfix] [docs] Fix broken flink-training links in hands-on section#27746
kylerballiet wants to merge 1 commit intoapache:masterfrom
kylerballiet:fix-docs-broken-links

Conversation

@kylerballiet
Copy link

What is the purpose of the change

Fix broken flink-training links in the Learn Flink docs. Several pages have a "Hands-on" section that use the training_repo and training_link shortcodes (e.g. Intro to the DataStream API, Data Pipelines & ETL, Streaming Analytics, Event-driven Applications). Two issues affected all of these: (1) the repo link pointed to a branch (e.g. release-2.2) that does not exist in apache/flink-training; (2) the exercise links used blob for paths that are directories in the repo, so the URLs were wrong. Both shortcodes now use the master branch, and the exercise shortcode uses tree instead of blob, so the links work on every page that uses them.

Brief change log

  • training_repo.html: use master branch for the repo URL instead of .Site.Params.Branch
  • training_link.html: use tree instead of blob for exercise paths, and use master branch

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

I built the docs locally using the project's pinned Hugo version (0.124.1 via setup_hugo.sh and build_docs.sh) and verified the flink-training and exercise links on all affected Learn Flink pages (DataStream API, Data Pipelines & ETL, Streaming Analytics, Event-driven Applications); the links resolve correctly on each page. Note: building with a newer Hugo (e.g. 0.157 from Homebrew) produced several unrelated template errors, so I used the pinned version for verification.

Does this pull request potentially affect one of the following parts:

  • Dependencies: no
  • The public API: no
  • The serializers: no
  • The runtime per-record code paths: no
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented Mar 6, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Member

@featzhang featzhang left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the broken links 👍

Since the original implementation used .Site.Params.Branch, it might be better to keep the parameterization instead of hardcoding master.

For example:

{{ .Site.Params.TrainingBranch | default "master" }}

This would allow the training repository branch to be configurable in the future.

- name: The rendered link name (required)
*/}}
<a href="{{ .Site.Params.TrainingExercises }}/tree/{{ .Site.Params.Branch }}/">
<a href="{{ .Site.Params.TrainingExercises }}/tree/master/">
Copy link
Member

Choose a reason for hiding this comment

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

{{ .Site.Params.TrainingBranch | default "master" }}

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants