mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-14 17:00:40 +00:00
11 lines
338 B
HTML
11 lines
338 B
HTML
{{ $file := .Get "file" }}
|
|
<div class="gdoc-include">
|
|
{{- if eq (.Get "markdown") "true" -}}
|
|
{{- $file | readFile | $.Page.RenderString -}}
|
|
{{- else if (.Get "language") -}}
|
|
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
|
|
{{- else -}}
|
|
{{ $file | readFile | safeHTML }}
|
|
{{- end -}}
|
|
</div>
|