From 9c53e64477cfb61237670cd994c930013f3bd71a Mon Sep 17 00:00:00 2001 From: Radoslav Gerganov Date: Sat, 14 Jan 2023 11:33:27 +0200 Subject: [PATCH] Fix shortcodes to work with newer versions of Hugo --- layouts/shortcodes/fluid_img.html | 3 ++- layouts/shortcodes/fluid_imgs.html | 3 ++- layouts/shortcodes/pure_table.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/fluid_img.html b/layouts/shortcodes/fluid_img.html index 6930dd95..24c7d1ed 100644 --- a/layouts/shortcodes/fluid_img.html +++ b/layouts/shortcodes/fluid_img.html @@ -1,7 +1,8 @@ +{{ $_hugo_config := `{ "version": 1 }` }} {{ if .IsNamedParams }}
{{ else }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/shortcodes/fluid_imgs.html b/layouts/shortcodes/fluid_imgs.html index f8997727..d4e5cf96 100644 --- a/layouts/shortcodes/fluid_imgs.html +++ b/layouts/shortcodes/fluid_imgs.html @@ -1,3 +1,4 @@ +{{ $_hugo_config := `{ "version": 1 }` }} {{ $paramCount := len .Params }} {{ if gt $paramCount 0 }}
@@ -18,4 +19,4 @@ {{ end }} {{ end }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/shortcodes/pure_table.html b/layouts/shortcodes/pure_table.html index 91236bcf..e7bb81ea 100644 --- a/layouts/shortcodes/pure_table.html +++ b/layouts/shortcodes/pure_table.html @@ -1,3 +1,4 @@ +{{ $_hugo_config := `{ "version": 1 }` }} {{ $fields := (index .Params 0) }} {{ $data := after 1 .Params }} @@ -17,4 +18,4 @@ {{ end }} - \ No newline at end of file +