Skip to content

Commit 81036f3

Browse files
Add include shortcode (#506)
Useful for including shortcodes saved as stand-alone files.
1 parent a43cc80 commit 81036f3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

layouts/shortcodes/include.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{ $file := .Get 0 }}
2+
{{ (printf "%s%s" .Page.File.Dir $file) | readFile | replaceRE "^---[\\s\\S]+?---" "" | markdownify }}

0 commit comments

Comments
 (0)