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.
2 parents c266603 + d370800 commit b01ce83Copy full SHA for b01ce83
layouts/shortcodes/codenew.html
@@ -4,7 +4,7 @@
4
{{ $fileDir := path.Split $file }}
5
{{ $bundlePath := path.Join .Page.File.Dir $fileDir.Dir }}
6
{{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }}
7
-{{ $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 }}
8
{{/* First assume this is a bundle and the file is inside it. */}}
9
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
10
{{ with $resource }}
0 commit comments