I see from the source of Black Friday that there are pretty much no options for customizing HTML output. There is a fork of the project called mmark which is quite similar but has many more extensions. Maybe Hugo could use this renderer instead of/in addition to Black Friday?
The problem I’m running into that prompted me to inquire about this is that I use the table extension to Markdown often, and I’m using Bootstrap. The normal table rendering basically has no style. To apply Bootstrap’s styling, you have to add the “table” class (they required this because lots of tables are used incorrectly for things other than tabular data).
just run instead. It works okay but is definitely a kludge. I can’t figure out how to just apply it automatically without forking blackfriday (https://github.com/russross/blackfriday/blob/master/html.go#L293 shows how simple this would be) or building bootstrap on my own with an option to change the table-styling selector.
Can you elaborate on where you do this? I need to fix this issue as well and I am VERY new to hugo and completely naive in Go. Your help would be greatly appreciated!
Hey @GusDunn. You’re including the bootstrap CSS, right? If so, you can put that anywhere in your page (in a <script> tag of course). The footer would be a good place. Depends on your template; I wrote my own layout entirely so I stuck it in layouts/partials/footer.html.
Of course, this will apply the Bootstrap table to all tables on the page. So if you’re using tables for layout instead of tabular data (bad!) then terrible things will happen.