diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html new file mode 100644 index 0000000..ae24c26 --- /dev/null +++ b/layouts/shortcodes/include.html @@ -0,0 +1,17 @@ +{{ $path := "" }} +{{ $markdown := false }} +{{ if .IsNamedParams }} + {{ $path = .Get "path" }} + {{ with .Get "markdown" }} + {{ $markdown = . }} + {{ end }} +{{ else }} + {{ $path = .Get 0 }} +{{ end }} + + +{{ if $markdown }} + {{ $path | readFile | markdownify }} +{{ else }} + {{ $path | readFile }} +{{ end }}