Fix the codenew shortcode where site.Params.githubWebRow is null (#12743)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
66683ea82b
commit
9054d61419
@@ -4,7 +4,7 @@
|
|||||||
{{ $fileDir := path.Split $file }}
|
{{ $fileDir := path.Split $file }}
|
||||||
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
|
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
|
||||||
{{ $filename := path.Join $p.Dir $file }}
|
{{ $filename := path.Join $p.Dir $file }}
|
||||||
{{ $ghlink := printf "https://%s/blob/master/content/%s/%s" site.Params.githubWebsiteRepo .Page.Lang $filename | safeURL }}
|
{{ $ghlink := printf "https://%s/blob/master/content/%s/%s" site.Params.githubwebsiterepo .Page.Lang $filename | safeURL }}
|
||||||
{{/* First assume this is a bundle and the file is inside it. */}}
|
{{/* First assume this is a bundle and the file is inside it. */}}
|
||||||
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
|
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
|
||||||
{{ with $resource }}
|
{{ with $resource }}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{{ $fileDir := path.Split $file }}
|
{{ $fileDir := path.Split $file }}
|
||||||
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
|
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
|
||||||
{{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }}
|
{{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }}
|
||||||
{{ $ghlink := printf "https://%s/master%s" site.Params.githubWebsiteRaw $filename | safeURL }}
|
{{ $ghlink := printf "https://%s/master%s" site.Params.githubwebsiteraw $filename | safeURL }}
|
||||||
{{/* First assume this is a bundle and the file is inside it. */}}
|
{{/* First assume this is a bundle and the file is inside it. */}}
|
||||||
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
|
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
|
||||||
{{ with $resource }}
|
{{ with $resource }}
|
||||||
|
|||||||
Reference in New Issue
Block a user