bobatheme/layouts/shortcodes/include.html
2023-01-23 17:39:20 -06:00

18 lines
326 B
HTML

{{ $path := "" }}
{{ $markdown := false }}
{{ if .IsNamedParams }}
{{ $path = .Get "path" }}
{{ with .Get "markdown" }}
{{ $markdown = . }}
{{ end }}
{{ else }}
{{ $path = .Get 0 }}
{{ end }}
{{ if $markdown }}
{{ $path | readFile | markdownify }}
{{ else }}
{{ $path | readFile }}
{{ end }}