Discussion:
[hakyll] ANN: Hakyll-4.7.0.0
Jasper Van der Jeugt
2015-05-29 09:56:43 UTC
Permalink
Hey all,

I have just released Hakyll-4.7.0.0, which includes the first breaking
change in a while.

Pandoc has been updated from 1.13 to 1.14. New in 1.14 is proper error
handling. Because of this, some functions in the Pandoc API can now
return an error, whereas they just returned a result before.

In Hakyll, that means that a bunch of the functions in
Hakyll.Web.Pandoc now return a result in the `Compiler` monad, so we
can nicely deal with these errors. Upgrading should therefore be
straightforward, but of course, let me know if you run into any
trouble.

Peace,
Jasper
--
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.
Yun
2015-06-09 22:21:51 UTC
Permalink
I am sorry to ask a silly question, since I know too few about Haskell.

I wrote everything in markdown. So to generate the blog list, once i use

getResourceBody
Post by Jasper Van der Jeugt
= applyAsTemplate archiveCtx
= return . renderPandocWith defaultHakyllReaderOptions
myWriterOptions
Post by Jasper Van der Jeugt
= loadAndApplyTemplate "templates/default.html"
archiveCtx
Post by Jasper Van der Jeugt
= relativizeUrls
but now this doesn't work with 4.7.0.0

I know the way to fix this should be so easy that I should try to find it
myself. But I really don't know how to deal with the error message.
I will appreciate someone could help me. Thank you in advance!

Best regards,
Yun
Post by Jasper Van der Jeugt
Hey all,
I have just released Hakyll-4.7.0.0, which includes the first breaking
change in a while.
Pandoc has been updated from 1.13 to 1.14. New in 1.14 is proper error
handling. Because of this, some functions in the Pandoc API can now
return an error, whereas they just returned a result before.
In Hakyll, that means that a bunch of the functions in
Hakyll.Web.Pandoc now return a result in the `Compiler` monad, so we
can nicely deal with these errors. Upgrading should therefore be
straightforward, but of course, let me know if you run into any
trouble.
Peace,
Jasper
--
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.
Jasper Van der Jeugt
2015-06-10 08:46:17 UTC
Permalink
Hey,

The type of `renderPandocWith` changed. It used to be:

renderPandocWith
:: Text.Pandoc.Options.ReaderOptions
-> Text.Pandoc.Options.WriterOptions
-> Item String
-> Item String

And it is now:

renderPandocWith
:: Text.Pandoc.Options.ReaderOptions
-> Text.Pandoc.Options.WriterOptions
-> Item String
-> Compiler (Item String)

So now the return value of `renderPandocWith` is already in the
`Compiler` Monad. This means you don't need the extra return:

getResourceBody
Post by Yun
= applyAsTemplate archiveCtx
= renderPandocWith defaultHakyllReaderOptions myWriterOptions
= loadAndApplyTemplate "templates/default.html" archiveCtx
= relativizeUrls
Hope this helps,
Peace,
Jasper
Post by Yun
I am sorry to ask a silly question, since I know too few about Haskell.
I wrote everything in markdown. So to generate the blog list, once i use
getResourceBody
= applyAsTemplate archiveCtx
= return . renderPandocWith defaultHakyllReaderOptions
myWriterOptions
= loadAndApplyTemplate "templates/default.html"
archiveCtx
= relativizeUrls
but now this doesn't work with 4.7.0.0
I know the way to fix this should be so easy that I should try to find it
myself. But I really don't know how to deal with the error message.
I will appreciate someone could help me. Thank you in advance!
Best regards,
Yun
Hey all,
I have just released Hakyll-4.7.0.0, which includes the first breaking
change in a while.
Pandoc has been updated from 1.13 to 1.14. New in 1.14 is proper error
handling. Because of this, some functions in the Pandoc API can now
return an error, whereas they just returned a result before.
In Hakyll, that means that a bunch of the functions in
Hakyll.Web.Pandoc now return a result in the `Compiler` monad, so we
can nicely deal with these errors. Upgrading should therefore be
straightforward, but of course, let me know if you run into any
trouble.
Peace,
Jasper
--
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
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.
Yun
2015-06-11 01:15:48 UTC
Permalink
Thank you very much! The new one seems to be more friendly!
Hey,
renderPandocWith
:: Text.Pandoc.Options.ReaderOptions
-> Text.Pandoc.Options.WriterOptions
-> Item String
-> Item String
renderPandocWith
:: Text.Pandoc.Options.ReaderOptions
-> Text.Pandoc.Options.WriterOptions
-> Item String
-> Compiler (Item String)
So now the return value of `renderPandocWith` is already in the
getResourceBody
Post by Yun
= applyAsTemplate archiveCtx
= renderPandocWith defaultHakyllReaderOptions myWriterOptions
= loadAndApplyTemplate "templates/default.html" archiveCtx
= relativizeUrls
Hope this helps,
Peace,
Jasper
Post by Yun
I am sorry to ask a silly question, since I know too few about Haskell.
I wrote everything in markdown. So to generate the blog list, once i use
getResourceBody
= applyAsTemplate archiveCtx
= return . renderPandocWith defaultHakyllReaderOptions
myWriterOptions
= loadAndApplyTemplate "templates/default.html"
archiveCtx
= relativizeUrls
but now this doesn't work with 4.7.0.0
I know the way to fix this should be so easy that I should try to find
it
Post by Yun
myself. But I really don't know how to deal with the error message.
I will appreciate someone could help me. Thank you in advance!
Best regards,
Yun
Hey all,
I have just released Hakyll-4.7.0.0, which includes the first breaking
change in a while.
Pandoc has been updated from 1.13 to 1.14. New in 1.14 is proper error
handling. Because of this, some functions in the Pandoc API can now
return an error, whereas they just returned a result before.
In Hakyll, that means that a bunch of the functions in
Hakyll.Web.Pandoc now return a result in the `Compiler` monad, so we
can nicely deal with these errors. Upgrading should therefore be
straightforward, but of course, let me know if you run into any
trouble.
Peace,
Jasper
--
You received this message because you are subscribed to the Google
Groups
Post by Yun
"hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Yun
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.
Loading...