mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 21:25:59 -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 }}
|