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
Warn on new use of param shortcode #46324
Warn on new use of param shortcode #46324
Conversation
@@ -24,12 +24,12 @@ kubectl এর সর্বশেষ সামঞ্জস্যপূর্ণ | |||
|
|||
### উইন্ডোজে কার্ল ব্যাবহার kubectl বাইনারি ইনস্টল করুন | |||
|
|||
1. [latest release {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe) ডাউনলোড করুন। | |||
1. [kubectl {{% skew currentPatchVersion %}}](https://dl.k8s.io/release/v{{% skew currentPatchVersion %}}/bin/windows/amd64/kubectl.exe) এর সর্বশেষ প্রকাশ ডাউনলোড করুন |
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.
This is a machine-aided translation; I don't speak Bengali
ca0d165
to
c370e2c
Compare
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Overall, the change looks good!
Just added an observation on the removal of shortcode.
LGTM
layouts/shortcodes/param.html
Outdated
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.
I'm surprised that removing the shortcode HTML file hasn't caused build errors, considering there are still instances in the repo where the <param>
shortcode is used (example 1, example 2). I assume now the site is using the shortcode source retrieved from Docsy or its dependencies during the build process.
/retitle Drop param shortcodes, warn on new use |
Do we want to merge this with lots of pages showing warnings, or split out the Bengali fixes, or something else? |
c370e2c
to
9e52ecc
Compare
9e52ecc
to
4c68cd2
Compare
3c98451
to
54e1a23
Compare
bn fixes has been merged in this PR |
b64847c
to
add8b37
Compare
/retitle Warn on new use of param shortcode |
/remove-area blog release |
@sftim: Those labels are not set on the issue: In response to this:
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-sigs/prow repository. |
{{- with $name -}} | ||
{{- with ($.Page.Param .) }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}} | ||
{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}} |
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.
This is Hugo's default param
shortcode.
{{- $warningText := slice | ||
"Deprecated param shortcode detected." | ||
"The Kubernetes website does not / should not use param shortcodes." | ||
( printf "Check %q" ( replaceRE "^/src/" "" . ) ) -}} | ||
{{- if and (eq $.Site.LanguagePrefix "") (ne $name "version" ) -}} | ||
{{- warnf (delimit $warningText " " ) -}} | ||
{{- end -}} | ||
{{- end -}} |
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.
This is our warning mechanism.
Updated. This PR won't add warnings, but future pages that use |
/hold cancel The fixes to Bengali have merged. |
/remove-language bn |
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.
The changes look good!
/lgtm
LGTM label has been added. Git tree hash: 6111cea251c00b94b9ed363b6347e2402e3472c7
|
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: salaxander 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 |
[AIUI] we prefer not to use the
param
shortcode (we switched to a new approach in PR #40692)Change that shortcode to warn if it's used other than for
version
(which we still support, although I recommend using theskew
shortcode in its place).As part of this:switch Bengali to the new approachfix a broken link in a blog articlechange a couple of pages to use theskew
shortcode/area web-development