From 96b5f472dffbcb24f5b49081175bca65798176ee Mon Sep 17 00:00:00 2001 From: Sangam Biradar Date: Mon, 25 Jan 2021 04:00:10 +0530 Subject: [PATCH] Create excerpt-include.html --- layouts/shortcodes/excerpt-include.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 layouts/shortcodes/excerpt-include.html diff --git a/layouts/shortcodes/excerpt-include.html b/layouts/shortcodes/excerpt-include.html new file mode 100644 index 00000000..d11ad97c --- /dev/null +++ b/layouts/shortcodes/excerpt-include.html @@ -0,0 +1,15 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $excerpt := findRE "(?ms){{%\\s*excerpt[^%]*%}}(.|\n)*?{{%\\s*/excerpt\\s*%}}" ( readFile (printf "./content/%s" (.Get "filename")) ) }} +{{ range $excerpt }} + {{if ($.Get "panel")}} +
+
{{$.Get "panel"}}
+
+ {{ (replaceRE "(?ms){{%\\s*excerpt[^%]*%}}(.*){{%\\s*/excerpt\\s*%}}" "$1" .) | safeHTML | markdownify }} +
+
+ {{else}} + {{ (replaceRE "(?ms){{%\\s*excerpt[^%]*%}}(.*){{%\\s*/excerpt\\s*%}}" "$1" .) | safeHTML | markdownify }} + {{ end }} +{{ end }} +{{.Inner}}