mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -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 }}
|
{{ $path = .Get 0 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with ($path | readFile) }}
|
||||||
{{ if $markdown }}
|
{{ if $markdown }}
|
||||||
{{ $path | readFile | .Page.RenderString (dict "display" "block") }}
|
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $path | readFile }}
|
{{ $path | readFile }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "file not found: %s" $path }}
|
||||||
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user