From 4613f5bc64b0d32e84f95667ffeffecee76be272 Mon Sep 17 00:00:00 2001 From: Mohammad Tabrizi Date: Sat, 18 Jun 2022 21:05:08 -0400 Subject: [PATCH] added table shortcode based off of https://zwbetz.com/style-a-markdown-table-with-bootstrap-classes-in-hugo/ --- layouts/shortcodes/mytable.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 layouts/shortcodes/mytable.html diff --git a/layouts/shortcodes/mytable.html b/layouts/shortcodes/mytable.html new file mode 100644 index 0000000..c1991d9 --- /dev/null +++ b/layouts/shortcodes/mytable.html @@ -0,0 +1,6 @@ +{{ $htmlTable := .Inner | markdownify }} +{{ $class := .Get 0 }} +{{ $old := "" }} +{{ $new := printf "
" $class }} +{{ $htmlTable := replace $htmlTable $old $new }} +{{ $htmlTable | safeHTML }} \ No newline at end of file