From db4faa1ed8849a4b5cf3a685f9cf252819043643 Mon Sep 17 00:00:00 2001 From: Abigail Cabunoc Mayes Date: Fri, 11 Mar 2022 11:30:16 -0500 Subject: [PATCH] Create table.html --- layouts/shortcodes/table.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 layouts/shortcodes/table.html diff --git a/layouts/shortcodes/table.html b/layouts/shortcodes/table.html new file mode 100644 index 0000000..69c1ec4 --- /dev/null +++ b/layouts/shortcodes/table.html @@ -0,0 +1,8 @@ +{{ $_hugo_config := `{ "version": 1 }` }} + +{{ $htmlTable := .Inner | markdownify }} +{{ $class := .Get 0 }} +{{ $old := "" }} +{{ $new := printf "
" $class }} +{{ $htmlTable := replace $htmlTable $old $new }} +{{ $htmlTable | safeHTML }}