From e925be185d9ee365fb8b4d97f70a621a6e371d85 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Thu, 8 Sep 2022 10:59:51 -0400 Subject: [PATCH] Add 'verbatim-assets' shortcode for code blocks or anywhere else we don't want to render the assets (e.g with a plain text file). Signed-off-by: Daniel F. Dickinson --- layouts/shortcodes/verbatim-assets.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 layouts/shortcodes/verbatim-assets.html diff --git a/layouts/shortcodes/verbatim-assets.html b/layouts/shortcodes/verbatim-assets.html new file mode 100644 index 0000000..8154b8a --- /dev/null +++ b/layouts/shortcodes/verbatim-assets.html @@ -0,0 +1,6 @@ +{{- $curPage := .Page -}} +{{- $page_asset_name := .Get 0 -}} +{{- $page_asset := resources.Get $page_asset_name -}} +{{- with $page_asset -}} + {{ .Content }} +{{- end -}}