bobatheme/layouts/shortcodes/include.html

18 lines
358 B
HTML
Raw Normal View History

2023-01-23 17:39:20 -06:00
{{ $path := "" }}
{{ $markdown := false }}
{{ if .IsNamedParams }}
{{ $path = .Get "path" }}
{{ with .Get "markdown" }}
{{ $markdown = . }}
{{ end }}
{{ else }}
{{ $path = .Get 0 }}
{{ end }}
{{ if $markdown }}
{{ $path | readFile | .Page.RenderString (dict "display" "block") }}
2023-01-23 17:39:20 -06:00
{{ else }}
{{ $path | readFile }}
{{ end }}