j***@gmail.com
2018-06-08 11:48:03 UTC
I'd like to be able to include some post-specific CSS code in my markdown
posts. I have a global CSS file too, but many of my posts tend to have
some local CSS snippets too, especially for using flexbox for image
layout. A global CSS becomes difficult to maintain.
Anyone have any good ideas or snippets on how I might include a CSS
fragment directly in my .md file so that it'd automatically be included for
that particular post? Ideally I'd like the CSS to be inlined in the
generated HTML.
I guess another option would be including some kind of a CSS library like
Bulma and using their column implementation. But IMO that's a bit overkill
when all I need is a couple of flexbox declarations.
Another thing I hit with Pandoc was that it seems to add some extra <p>'s
for raw HTML. E.g.,
<div class="foo">
<img ...>
</div>
This gets compiled into
<div class="foo">
<p>
<img ...>
</p>
</div>
(This breaks CSS rules unless I declare my CSS rules to incude that p
element.)
Anyone have a fix for this? It works fine (ie., doesn't add <p>) if I
write the raw HTML on a single line.
I realize this second question is more of a Pandoc question, but mentioning
it here anyway, in case someone's hit this and has a good way to deal with
that.
Janne
posts. I have a global CSS file too, but many of my posts tend to have
some local CSS snippets too, especially for using flexbox for image
layout. A global CSS becomes difficult to maintain.
Anyone have any good ideas or snippets on how I might include a CSS
fragment directly in my .md file so that it'd automatically be included for
that particular post? Ideally I'd like the CSS to be inlined in the
generated HTML.
I guess another option would be including some kind of a CSS library like
Bulma and using their column implementation. But IMO that's a bit overkill
when all I need is a couple of flexbox declarations.
Another thing I hit with Pandoc was that it seems to add some extra <p>'s
for raw HTML. E.g.,
<div class="foo">
<img ...>
</div>
This gets compiled into
<div class="foo">
<p>
<img ...>
</p>
</div>
(This breaks CSS rules unless I declare my CSS rules to incude that p
element.)
Anyone have a fix for this? It works fine (ie., doesn't add <p>) if I
write the raw HTML on a single line.
I realize this second question is more of a Pandoc question, but mentioning
it here anyway, in case someone's hit this and has a good way to deal with
that.
Janne
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.