diff options
| -rw-r--r-- | site/layouts/shortcodes/bs-table.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/site/layouts/shortcodes/bs-table.html b/site/layouts/shortcodes/bs-table.html new file mode 100644 index 000000000..6f972d665 --- /dev/null +++ b/site/layouts/shortcodes/bs-table.html @@ -0,0 +1,11 @@ +{{- /* + Usage: `table "class"`, + where class can be anything +*/ -}} + +{{ $htmlTable := .Inner | markdownify }} +{{ $css_class := .Get 0 | default "table" }} +{{ $old := "<table>" }} +{{ $new := printf "<table class=\"%s\">" $css_class }} +{{ $htmlTable := replace $htmlTable $old $new }} +{{ $htmlTable | safeHTML }} |
