Skip to content

Commit b01ce83

Browse files
authored
Merge pull request #33188 from sftim/20220425_fix_codenew_old_releases
Use previous release examples in codenew shortcode
2 parents c266603 + d370800 commit b01ce83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/shortcodes/codenew.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{ $fileDir := path.Split $file }}
55
{{ $bundlePath := path.Join .Page.File.Dir $fileDir.Dir }}
66
{{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }}
7-
{{ $ghlink := printf "https://%s/main%s" site.Params.githubwebsiteraw $filename | safeURL }}
7+
{{ $ghlink := printf "https://%s/%s%s" site.Params.githubwebsiteraw (default "main" site.Params.docsbranch) $filename | safeURL }}
88
{{/* First assume this is a bundle and the file is inside it. */}}
99
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
1010
{{ with $resource }}

0 commit comments

Comments
 (0)