Replies: 1 comment 2 replies
-
You could also use Markdown attributes — this is the Doks preferred way. To be documented, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Accidently posted this in getdoks.org repo instead of doks...
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