-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-23172][docs] Fix broken links to Task Failure Recovery page on Configuration page #16935
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
Conversation
… Configuration page
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit e5911d7 (Mon Aug 23 04:12:19 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
| code("fixed-delay"), | ||
| link( | ||
| "{{.Site.BaseURL}}docs/ops/state/task_failure_recovery#fixed-delay-restart-strategy", | ||
| "{{.Site.BaseURL}}/{{.Site.LanguagePrefix}}/docs/ops/state/task_failure_recovery#fixed-delay-restart-strategy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No other link seems to be using the LanguagePrefix, why should this one? Can we not use {{< ref "docs/.." >}} because the generated files are treated as short-codes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for reviewing, @zentol! LanguagePrefix is used here because we think it's better to let the links in the Chinese version direct to the page in the Chinese version, rather than the English version. With LanguagePrefix the link will be like https://ci.apache.org/projects/flink/flink-docs-master/zh/docs/....
I've tried {{< ref "docs/.." >}}, but it doesn't works. The error message is: unexpected "<" in command. I'm not sure whether ref is available for the static html or not.
Here's something I found that may be helpful: https://discourse.gohugo.io/t/using-shortcodes-in-html-content/2960/5
flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
Outdated
Show resolved
Hide resolved
|
@Thesharing can you also create a PR to fix the link in 1.13? |
What is the purpose of the change
This pull request intend to fix broken links to Task Failure Recovery page on Configuration page. In Hugo we can use the variable
{{.Site.BaseURL}}to make sure the links are always right no matter where they are. This variable makes sure the links refer to absolute path instead of relative path.In #16724, we verify the changes by running the local server with Hugo and checking if the links head to the correct page. But it seems
{{.Site.BaseURL}}in local server is ended with/, while the remote server that hosts the docs for Flink doesn't. Thus, we need to add the suffix.Furthermore, we add a variable
{{.Site.LanguagePrefix}}to make sure the Chinese version will direct to the page in Chinese version, rather than the English version.Brief change log
Verifying this change
Run the local server with Hugo and check if the links head to the correct pages.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation