hakyll 4.16.2.2 → 4.16.3.0
raw patch · 3 files changed
+48/−6 lines, 3 filesdep ~data-defaultnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: data-default
API changes (from Hackage documentation)
+ Hakyll.Web.Pandoc: pandocItemCompilerWithTransformM :: ReaderOptions -> WriterOptions -> (Item Pandoc -> Compiler (Item Pandoc)) -> Compiler (Item String)
+ Hakyll.Web.Pandoc: renderPandocItemWithTransformM :: ReaderOptions -> WriterOptions -> (Item Pandoc -> Compiler (Item Pandoc)) -> Item String -> Compiler (Item String)
Files
- CHANGELOG.md +7/−0
- hakyll.cabal +4/−4
- lib/Hakyll/Web/Pandoc.hs +37/−2
CHANGELOG.md view
@@ -4,6 +4,13 @@ # Releases +## Hakyll 4.16.3.0 (2024-10-24)++- Bump `pandoc` upper bound to include up to version 3.5+ (#1041, #1042, #1047) (contributions by Alexander Batischev)+- Add `renderPandocItemWithTransformM` and `pandocItemCompilerWithTransformM`+ (#1020) (contribution by Tony Zorman)+ ## Hakyll 4.16.2.2 (2024-07-05) - Bump `tasty-quickcheck` upper bound to 0.12 (contribution by Alexander
hakyll.cabal view
@@ -1,5 +1,5 @@ Name: hakyll-Version: 4.16.2.2+Version: 4.16.3.0 Synopsis: A static website compiler library Description:@@ -254,7 +254,7 @@ Other-Modules: Hakyll.Web.Pandoc.Binary Build-Depends:- pandoc >= 2.11 && < 2.20 || >= 3.0 && < 3.3+ pandoc >= 2.11 && < 2.20 || >= 3.0 && < 3.6 Cpp-options: -DUSE_PANDOC @@ -321,7 +321,7 @@ Cpp-options: -DUSE_PANDOC Build-Depends:- pandoc >= 2.11 && < 2.20 || >= 3.0 && < 3.3+ pandoc >= 2.11 && < 2.20 || >= 3.0 && < 3.6 Executable hakyll-init@@ -355,4 +355,4 @@ base >= 4.12 && < 5, directory >= 1.0 && < 1.4, filepath >= 1.0 && < 1.6,- pandoc >= 2.11 && < 2.20 || >= 3.0 && < 3.3+ pandoc >= 2.11 && < 2.20 || >= 3.0 && < 3.6
lib/Hakyll/Web/Pandoc.hs view
@@ -10,12 +10,14 @@ , renderPandocWith , renderPandocWithTransform , renderPandocWithTransformM+ , renderPandocItemWithTransformM -- * Derived compilers , pandocCompiler , pandocCompilerWith , pandocCompilerWithTransform , pandocCompilerWithTransformM+ , pandocItemCompilerWithTransformM -- * Default options , defaultHakyllReaderOptions@@ -120,10 +122,12 @@ ----------------------------------------------------------------------------------- | Similar to `renderPandocWithTransform`, but the Pandoc transformation is+-- | Similar to 'renderPandocWithTransform', but the Pandoc transformation is -- monadic. This is useful when you want the pandoc--- transformation to use the `Compiler` information such as routes,+-- transformation to use the 'Compiler' information such as routes, -- metadata, etc. along with your own transformations beforehand.+--+-- @since 4.16.3.0 renderPandocWithTransformM :: ReaderOptions -> WriterOptions -> (Pandoc -> Compiler Pandoc) -> Item String@@ -133,6 +137,23 @@ --------------------------------------------------------------------------------+-- | Like 'renderPandocWithTransformM', but work on an @'Item' 'Pandoc'@ instead+-- of just a 'Pandoc'. This allows for more seamless composition of functions+-- that require the extra information that an 'Item' provides, like+-- bibliographic transformations with+-- 'Hakyll.Web.Pandoc.Biblio.processPandocBiblio'.+--+-- @since 4.16.3.0+renderPandocItemWithTransformM+ :: ReaderOptions -> WriterOptions+ -> (Item Pandoc -> Compiler (Item Pandoc))+ -> Item String+ -> Compiler (Item String)+renderPandocItemWithTransformM ropt wopt f i =+ writePandocWith wopt <$> (f =<< readPandocWith ropt i)+++-------------------------------------------------------------------------------- -- | Read a page render using pandoc pandocCompiler :: Compiler (Item String) pandocCompiler =@@ -168,6 +189,20 @@ -> Compiler (Item String) pandocCompilerWithTransformM ropt wopt f = getResourceBody >>= renderPandocWithTransformM ropt wopt f+++--------------------------------------------------------------------------------+-- | Like 'pandocCompilerWithTransformM', but work on an 'Item' 'Pandoc'+-- instead of just a 'Pandoc'. This allows for more seamless composition of+-- functions that require the extra information that an 'Item' provides, like+-- bibliographic transformations with+-- 'Hakyll.Web.Pandoc.Biblio.processPandocBiblio'.+pandocItemCompilerWithTransformM+ :: ReaderOptions -> WriterOptions+ -> (Item Pandoc -> Compiler (Item Pandoc))+ -> Compiler (Item String)+pandocItemCompilerWithTransformM ropt wopt f =+ getResourceBody >>= renderPandocItemWithTransformM ropt wopt f --------------------------------------------------------------------------------