Files
bobatheme/layouts/_shortcodes/include.html
BBaoVanC 1aa2f8ea5c Move template files based on Hugo v0.146 revamp
See https://gohugo.io/templates/new-templatesystem-overview/

Under layouts/
- mv _default/* .
- mv partials _partials
- mv shortcodes _shortcodes
- mv taxonomy/list.html taxonomy.html
- mv taxonomy/term.html term.html
2025-06-28 03:07:02 -05:00

21 lines
473 B
HTML

{{ $path := "" }}
{{ $markdown := false }}
{{ if .IsNamedParams }}
{{ $path = .Get "path" }}
{{ with .Get "markdown" }}
{{ $markdown = . }}
{{ end }}
{{ else }}
{{ $path = .Get 0 }}
{{ end }}
{{ with ($path | readFile) }}
{{ if $markdown }}
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
{{ else }}
{{ $path | readFile }}
{{ end }}
{{ else }}
{{ errorf "file not found: %s" $path }}
{{ end }}