File tree 1 file changed +9
-3
lines changed
website_and_docs/layouts/shortcodes
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 21
21
22
22
{{ $fullPath := .Get "path" }}
23
23
{{ $path := index (split $fullPath "#") 0 }}
24
+ {{ $hasFragment := in $fullPath "#" }}
24
25
25
26
{{ $apiUrl := printf "%s/%s/%s/contents%s?ref=%s" $apiBaseUrl $org $repo $path $branch }}
26
27
{{ $webUrl := printf "%s/%s/%s/blob/%s/%s" $webBaseUrl $org $repo $branch $fullPath }}
50
51
51
52
{{ highlight $codeSnippet $language }}
52
53
54
+ {{ if $hasFragment }}
55
+ < details class ="mt-2 ">
56
+ < summary > Show full example</ summary >
57
+ < div class ="pt-2 "> {{ highlight $content $language }}</ div >
58
+ </ details >
59
+ {{ end }}
60
+
53
61
< div class ="text-end pb-2 ">
54
62
< a href ="{{- $webUrl -}} " target ="_blank ">
55
63
< i class ="fas fa-external-link-alt pl-2 "> </ i >
58
66
</ div >
59
67
{{ else }}
60
68
{{ partial "github-content.html" }}
61
- {{ end }}
62
-
63
-
69
+ {{ end }}
You can’t perform that action at this time.
0 commit comments