In my site posts, I need to start with <div>
. So jekyll automatically insert p tag which disable the div tag.
Jekyll isn’t inserting the <p>
tag, that’s a Markdown thing. I don’t know if there’s a way to disable that but if there is you’ll want to look into Kramdown’s documentation as that’s what Jekyll uses to parse Mardown into HTML.
I did it with markdown="1"
in div
To my knowledge there is no way around that. You can however get around the effects by defining in your css how <p>
s behave. Get rid of all formatting around them and use another container for what was supposed to be your paragraphs before. That’s a bit of additional stuff but can mitigate the problem.
If you are working inside for example a table though you are pretty much out of luck. In that case don’t use markdown and write everything in xml. More of a pain but cleaner results.