Proposal to add a new shortcode "table" to Hugo

@maiki I agree that inline styling and css in shortcode raises some flags for me as well.

However, I agree that better table support would be helpful, in particular certain html specifications that aren’t implemented fully through blackfriday or mmark. For example rowspan and colspan would be very helpful for more complex tables in markdown, even being able to specify a cell as a header<th> but it hasn’t been ironed out yet in mmark or attempted to be implemented in blackfriday as far as I know.

Advanced features like caption elements, a summary attribute, or being able to specify the header scope attribute or id and header attributes for better semantics and accessibility would be nice as well.

While being able to edit elements and attributes directly has been discussed some, there is one work-around that I saw @bobvanvliet share in a couple of his posts using regular expressions (replacRE) to edit the code generated from the markdown parser. Perhaps using this technique with some partials and/or shortcodes could get us by until there is more functionality implemented in the markdown parsers or within hugo itself?

EDIT: @kaushalmodi it seems some of this functionality is possible using asciidoc tables, have you tried using that instead of markdown? It is possible to convert markdown to asciidoc in pandoc and asciidoctor lets you edit the templates so you can add in the ability to use your table styling with it.