在 hugo 中使用自建 table 及樣式

cd {blog};
cd layouts;
mkdir shortcodes;
vim table.html

table.html

{{ $attrs := "" }}
{{ range $k, $v := .Params }}
  {{ $attrs = printf "%s %s=\"%v\"" $attrs $k $v }}
{{ end }}

{{ $newTable := printf "<table %s>" $attrs }}
{{ (replace (.Inner | markdownify) "<table>" $newTable) | safeHTML }}

in your md