You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default table markdown doesn't make full use of the capabilities of Bootstrap CSS. The tables are not responsive (If you add too many columns without paying attention, you will destroy the layout on mobile devices) and sometimes hard to read. This can be easily fixed using Bootstrap, but unfortunately Hugo doesn't support a Table render hook due to performance reasons.
I therefore implemented a shortcode for tables that wraps the table in a responsive bootstrap table container and adds the possibility to add classes by using arguments.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
The default table markdown doesn't make full use of the capabilities of Bootstrap CSS. The tables are not responsive (If you add too many columns without paying attention, you will destroy the layout on mobile devices) and sometimes hard to read. This can be easily fixed using Bootstrap, but unfortunately Hugo doesn't support a Table render hook due to performance reasons.
I therefore implemented a shortcode for tables that wraps the table in a responsive bootstrap table container and adds the possibility to add classes by using arguments.
Most of the code is based on this post:
https://zwbetz.com/style-a-markdown-table-with-bootstrap-classes-in-hugo/
Shortcode called bootstrap-table.html:
example:
Beta Was this translation helpful? Give feedback.
All reactions