Fix the codenew shortcode where site.Params.githubWebRow is null (#12743)

This commit is contained in:
Dani Comnea
2019-02-21 01:00:48 +00:00
committed by Kubernetes Prow Robot
parent 66683ea82b
commit 9054d61419
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
{{ $fileDir := path.Split $file }}
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
{{ $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. */}}
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
{{ with $resource }}
+1 -1
View File
@@ -4,7 +4,7 @@
{{ $fileDir := path.Split $file }}
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
{{ $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. */}}
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
{{ with $resource }}