Closed AJChapman closed 4 years ago
Hey there! This seems like a good thing to add in some shape or form, just have a few thoughts about how to do it.
The implementation provided doesn't really make it clear what the PandocWriter is used for; I can see people wondering "Why does makePandocReader
require a PandocWriter
?"
Also the fact that this will be a breaking change is maybe not great. Perhaps we should instead introduce a makePandocReaderWithMetaWriter
or something similar. BTW is there a PandocWriter which when provided with behave the same as the current behaviour?
Ok, I've made the suggested changes:
makePandocReaderWithMetaWriter
and makePandocReaderWithMetaWriter'
so this is no longer a breaking change,makePandocReader
and makePandocReader'
to call the above using a plain-text renderer to preserve their original behaviour (untested),@ChrisPenner what do you think, any further changes needed?
Looks great! So sorry it took me so long to get around to this 😓 ; really appreciate this addition! 😄
Shipped in v.1.0.1.0
👍
http://hackage.haskell.org/package/slick
This allows you to put Markdown in your metadata fields. The markdown will be rendered to HTML like the post's content is.
My use case is that I had a
teaser
metadata item on my posts, and I wanted to have a link in one of my teasers, but the link was being stripped from it. It turns out that Pandoc does automatically render Markdown in metadata fields, but Slick'sflattenMeta
was erasing this, and only keeping the plain text.This could be a breaking change because along the way I added a
PandocWriter
argument tomakePandocReader
andmakePandocReader'
, which are both exported from the module, though they aren't used anywhere else in Slick.