mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -06:00
Throw error in include shortcode if file not found
This commit is contained in:
parent
0ddf0bdf42
commit
289f55dc19
@ -9,9 +9,12 @@
|
||||
{{ $path = .Get 0 }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if $markdown }}
|
||||
{{ $path | readFile | .Page.RenderString (dict "display" "block") }}
|
||||
{{ with ($path | readFile) }}
|
||||
{{ if $markdown }}
|
||||
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
|
||||
{{ else }}
|
||||
{{ $path | readFile }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $path | readFile }}
|
||||
{{ errorf "file not found: %s" $path }}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user