Merge pull request #33188 from sftim/20220425_fix_codenew_old_releases

Use previous release examples in codenew shortcode
This commit is contained in:
Kubernetes Prow Robot
2022-04-25 13:25:38 -07:00
committed by GitHub
+1 -1
View File
@@ -4,7 +4,7 @@
{{ $fileDir := path.Split $file }}
{{ $bundlePath := path.Join .Page.File.Dir $fileDir.Dir }}
{{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }}
{{ $ghlink := printf "https://%s/main%s" site.Params.githubwebsiteraw $filename | safeURL }}
{{ $ghlink := printf "https://%s/%s%s" site.Params.githubwebsiteraw (default "main" site.Params.docsbranch) $filename | safeURL }}
{{/* First assume this is a bundle and the file is inside it. */}}
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
{{ with $resource }}