diff --git a/layouts/shortcodes/token-link.md b/layouts/shortcodes/token-link.md index 3737328ae..04ca95623 100644 --- a/layouts/shortcodes/token-link.md +++ b/layouts/shortcodes/token-link.md @@ -1,4 +1,4 @@ - +{{- $s := newScratch -}} {{- $productPathData := split .Page.RelPermalink "/" -}} {{- $product := index $productPathData 1 -}} {{- $version := index $productPathData 2 -}} @@ -9,15 +9,15 @@ {{- $hasDescriptor := ne $descriptor "" -}} {{- $coreDescriptorBlacklist := slice "resource" "database" -}} {{- $enterpriseDescriptorBlacklist := slice "operator" -}} -{{- .Store.Set "showDescriptor" $hasDescriptor -}} +{{- $s.Set "showDescriptor" $hasDescriptor -}} {{- if (eq $version "core") -}} {{- if and $hasDescriptor (in $coreDescriptorBlacklist $descriptor) -}} - {{- .Store.Set "showDescriptor" false -}} + {{- $s.Set "showDescriptor" false -}} {{- end -}} {{- else if (eq $version "enterprise") -}} {{- if and $hasDescriptor (in $enterpriseDescriptorBlacklist $descriptor) -}} - {{- .Store.Set "showDescriptor" false -}} + {{- $s.Set "showDescriptor" false -}} {{- end -}} {{- end -}} -{{- $showDescriptor := .Store.Get "showDescriptor" -}} +{{- $showDescriptor := $s.Get "showDescriptor" -}} [{{ if $showDescriptor }}{{ $descriptor }} {{ end }}token]({{ $renderedLink }}) \ No newline at end of file