2021-02-21 05:27:54 -08:00
|
|
|
{{ $file := .Get "file" }}
|
2020-06-02 12:28:52 -07:00
|
|
|
<div class="gdoc-include">
|
2020-04-30 06:37:27 -07:00
|
|
|
{{- if eq (.Get "markdown") "true" -}}
|
2021-02-17 00:22:26 -08:00
|
|
|
{{- $file | readFile | $.Page.RenderString -}}
|
2020-04-30 06:37:27 -07:00
|
|
|
{{- else if (.Get "language") -}}
|
|
|
|
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{ $file | readFile | safeHTML }}
|
2020-04-30 11:55:53 -07:00
|
|
|
{{- end -}}
|
2020-06-02 12:28:52 -07:00
|
|
|
</div>
|