packages feed

hakyll 4.12.1.0 → 4.12.2.0

raw patch · 3 files changed

+21/−8 lines, 3 filesdep ~pandocPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: pandoc

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -4,6 +4,11 @@  # Releases +## Hakyll 4.12.2.0++- Bump pandoc to 2.2+- Fix path resolution in Pandoc.Biblio (contribution by knih)+ ## Hakyll 4.12.1.0  - Fix hakyll-init on older GHC versions
hakyll.cabal view
@@ -1,5 +1,5 @@ Name:    hakyll-Version: 4.12.1.0+Version: 4.12.2.0  Synopsis: A static website compiler library Description:@@ -227,7 +227,7 @@     Other-Modules:       Hakyll.Web.Pandoc.Binary     Build-Depends:-      pandoc          >= 2.0.5    && < 2.2,+      pandoc          >= 2.0.5    && < 2.3,       pandoc-citeproc >= 0.14     && < 0.15     Cpp-options:       -DUSE_PANDOC@@ -321,4 +321,4 @@     base      >= 4     && < 5,     directory >= 1.0   && < 1.4,     filepath  >= 1.0   && < 1.5,-    pandoc    >= 2.0.5 && < 2.2+    pandoc    >= 2.0.5 && < 2.3
lib/Hakyll/Web/Pandoc/Biblio.hs view
@@ -25,17 +25,19 @@ -------------------------------------------------------------------------------- import           Control.Monad            (liftM, replicateM) import           Data.Binary              (Binary (..))-import           Data.Default             (def) import           Data.Typeable            (Typeable) import           Hakyll.Core.Compiler+import           Hakyll.Core.Compiler.Internal import           Hakyll.Core.Identifier import           Hakyll.Core.Item+import           Hakyll.Core.Provider import           Hakyll.Core.Writable import           Hakyll.Web.Pandoc import           Hakyll.Web.Pandoc.Binary () import qualified Text.CSL                 as CSL import           Text.CSL.Pandoc          (processCites)-import           Text.Pandoc              (Pandoc, ReaderOptions (..))+import           Text.Pandoc              (Pandoc, ReaderOptions (..),+                                           enableExtension, Extension (..))   --------------------------------------------------------------------------------@@ -83,7 +85,7 @@ -------------------------------------------------------------------------------- biblioCompiler :: Compiler (Item Biblio) biblioCompiler = do-    filePath <- toFilePath <$> getUnderlying+    filePath <- getResourceFilePath     makeItem =<< unsafeCompiler (Biblio <$> CSL.readBiblioFile idpred filePath)   where     -- This is a filter on citations.  We include all citations.@@ -98,7 +100,9 @@                  -> Compiler (Item Pandoc) readPandocBiblio ropt csl biblio item = do     -- Parse CSL file, if given-    style <- unsafeCompiler $ CSL.readCSLFile Nothing . toFilePath . itemIdentifier $ csl+    provider <- compilerProvider <$> compilerAsk+    style <- unsafeCompiler $+             CSL.readCSLFile Nothing . (resourceFilePath provider) . itemIdentifier $ csl      -- We need to know the citation keys, add then *before* actually parsing the     -- actual page. If we don't do this, pandoc won't even consider them@@ -115,4 +119,8 @@     csl <- load $ fromFilePath cslFileName     bib <- load $ fromFilePath bibFileName     liftM writePandoc-        (getResourceBody >>= readPandocBiblio def csl bib)+        (getResourceBody >>= readPandocBiblio ropt csl bib)+    where ropt = defaultHakyllReaderOptions+            { -- The following option enables citation rendering+              readerExtensions = enableExtension Ext_citations $ readerExtensions defaultHakyllReaderOptions+            }