parsiya / Hugo-Shortcodes

Parsia's Hugo Shortcodes
MIT License
106 stars 14 forks source link

Shortcodes support tablecaption #5

Open caijun opened 7 years ago

caijun commented 7 years ago

Now Shortcodes support codecaption and imagecaption, how about tablecaption?

parsiya commented 7 years ago

Hi Can you elaborate a bit more? Like a caption for tables?

It's going to be more complex as most likely data in the cells need to be read from a data file.

caijun commented 7 years ago

Yes, a caption for tables. You think further than me. I just think as the markdown supports how to create table quickly, we can go a bit further by adding a caption for the table and the caption and cells are rendering together.

parsiya commented 7 years ago

Yes you are right. We probably do not even need the data files. We can just put the table inside the tag and wrap it around with a caption. I have to go and see how the final structure of a table after Hugo's processing looks and how it can be wrapped in a caption. Seems like HTML supports a "Caption" element for tables, so it should be theoretically simple.