added table shortcode based off of https://zwbetz.com/style-a-markdown-table-with-bootstrap-classes-in-hugo/
This commit is contained in:
parent
38f059ff01
commit
4613f5bc64
6
layouts/shortcodes/mytable.html
Normal file
6
layouts/shortcodes/mytable.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{{ $htmlTable := .Inner | markdownify }}
|
||||||
|
{{ $class := .Get 0 }}
|
||||||
|
{{ $old := "<table>" }}
|
||||||
|
{{ $new := printf "<table class=\"%s\">" $class }}
|
||||||
|
{{ $htmlTable := replace $htmlTable $old $new }}
|
||||||
|
{{ $htmlTable | safeHTML }}
|
Loading…
x
Reference in New Issue
Block a user