You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has the same cause as #18691 and #18129.
This behavior was originally fixed by #18694 (albeit for unrelated reasons) and re-introduced by #18727.
Why did this happen?
Hugo's alias handling determines this behavior.
How Hugo handles aliases
Hugo features an alias attribute in the front matter of Markdown files. Aliases serve as convenient redirects. Per Hugo documentation for aliases, aliases can use absolute or relative paths:
Aliases comes in two forms:
Starting with a / meaning they are relative to the BaseURL, e.g. /posts/my-blogpost/
They are relative to the Page they’re defined in, e.g. my-blogpost or even something like ../blog/my-blogpost (new in Hugo 0.55).
Importantly, Hugo doesn't throw errors or fail builds for competing aliases:
Aliases are rendered before any content are rendered and therefore will be overwritten by any content with the same location.
That describes the behavior we're seeing here:
Hugo first renders the /security/ alias (the leading slash creates an absolute path) for English content.
Hugo subsequently renders the /security/ alias for Chinese content, overwriting the absolute path.
Bug fix
Remove leading slashes from aliases in these localized files:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Bug report
What's the problem?
Visiting https://kubernetes.io/security/ redirects visitors from English to Chinese.
This issue has the same cause as #18691 and #18129.
This behavior was originally fixed by #18694 (albeit for unrelated reasons) and re-introduced by #18727.
Why did this happen?
Hugo's alias handling determines this behavior.
How Hugo handles aliases
Hugo features an
alias
attribute in the front matter of Markdown files. Aliases serve as convenient redirects. Per Hugo documentation for aliases, aliases can use absolute or relative paths:Importantly, Hugo doesn't throw errors or fail builds for competing aliases:
That describes the behavior we're seeing here:
/security/
alias (the leading slash creates an absolute path) for English content./security/
alias for Chinese content, overwriting the absolute path.Bug fix
The text was updated successfully, but these errors were encountered: