We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fe3d8d commit add8b37Copy full SHA for add8b37
layouts/shortcodes/param.html
@@ -1 +1,13 @@
1
-{{- .Page.Param (.Get 0) -}}
+{{- $name := (.Get 0) -}}
2
+{{- with $name -}}
3
+{{- with ($.Page.Param .) }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}}
4
+{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}}
5
+{{- with $.Page.File.Filename -}}
6
+{{- $warningText := slice
7
+ "Deprecated param shortcode detected."
8
+ "The Kubernetes website does not / should not use param shortcodes."
9
+ ( printf "Check %q" ( replaceRE "^/src/" "" . ) ) -}}
10
+ {{- if and (eq $.Site.LanguagePrefix "") (ne $name "version" ) -}}
11
+ {{- warnf (delimit $warningText " " ) -}}
12
+ {{- end -}}
13
+{{- end -}}
0 commit comments