mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-28 16:17:30 -05:00
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
This commit is contained in:
20
layouts/_shortcodes/include.html
Normal file
20
layouts/_shortcodes/include.html
Normal file
@ -0,0 +1,20 @@
|
||||
{{ $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 }}
|
Reference in New Issue
Block a user