Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
Right now I have block of article pages that only have Pandoc.render val and the markdown get rendered into my article page. However, since I use tailwind-css and it does reset all style value, then there is no difference between h1 and p. And it will be styled by specifying each tag's class.
Is there any additional step that I need to do if I want to use that css, so let say I can provide template so that the rendered result will already contain the class that I have in my template. For example, rather than got <h1> Hello World</h1>, the result will be like <h1 class="text-xl" > Hello World </h1>?
<h1> Hello World</h1>
<h1 class="text-xl" > Hello World </h1>
Or do I need to custom it in lucid part?
Render your doc inside a div with some class, and then style descendant elements in that class?
I did think of that. Is there any other option?
Not sure if Pandoc will ever support this: https://github.com/jgm/pandoc/issues/684
But commonmark-hs does: https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md
I'd recommend the div approach, if you want to style all documents uniformly.
Or you can write a Pandoc extension? Or a MMark extension: https://github.com/srid/neuron/blob/master/src/app/Text/MMark/Extension/SetTableClass.hs
Noted! I'll take a look into that. Yeah I think pandoc will not support it.