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.
1 parent c6e941d commit 5b4cbe3Copy full SHA for 5b4cbe3
layouts/shortcodes/code_sample.html
@@ -1,5 +1,6 @@
1
{{ $p := .Page }}
2
{{ $file := .Get "file" }}
3
+{{ $opts := .Get "options" | default "" }}
4
{{ $codelang := .Get "language" | default (path.Ext $file | strings.TrimPrefix ".") }}
5
{{ $fileDir := path.Split $file }}
6
{{ $bundlePath := path.Join .Page.File.Dir $fileDir.Dir }}
@@ -34,7 +35,7 @@
34
35
{{- end -}}
36
</div>
37
<div class="includecode" id="{{ $file | anchorize }}">
- {{- highlight . $codelang "" -}}
38
+ {{- highlight . $codelang $opts -}}
39
40
41
0 commit comments