From 2791cc7cb9326da46bc991dc8b4c836250f87c79 Mon Sep 17 00:00:00 2001 From: Alex Haslam Date: Wed, 20 Dec 2023 13:53:50 +0000 Subject: [PATCH] Pass icon as keyword argument to shortcode --- layouts/partials/keyword.html | 9 --------- layouts/shortcodes/keyword.html | 13 ++++++++++++- 2 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 layouts/partials/keyword.html diff --git a/layouts/partials/keyword.html b/layouts/partials/keyword.html deleted file mode 100644 index 9a5bbd6d..00000000 --- a/layouts/partials/keyword.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - {{ . }} - - - diff --git a/layouts/shortcodes/keyword.html b/layouts/shortcodes/keyword.html index 0453a36c..a954847a 100644 --- a/layouts/shortcodes/keyword.html +++ b/layouts/shortcodes/keyword.html @@ -1 +1,12 @@ -{{ partial "keyword.html" .Inner }} +{{ $icon := .Get "icon"}} + + + + {{if $icon}} + {{ partial "icon" $icon }} + {{ end }} {{- .Inner | markdownify -}} + + +