mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-14 12:25:58 -06:00
21 lines
473 B
HTML
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 }}
|