packages feed

hakyll 4.6.7.1 → 4.6.8.0

raw patch · 6 files changed

+51/−33 lines, 6 filesdep +time-locale-compatdep ~basePVP ok

version bump matches the API change (PVP)

Dependencies added: time-locale-compat

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Hakyll.Web.Pandoc.FileType: DocBook :: FileType
+ Hakyll.Web.Template.Context: teaserFieldWithSeparator :: String -> String -> Snapshot -> Context String

Files

hakyll.cabal view
@@ -1,5 +1,5 @@ Name:    hakyll-Version: 4.6.7.1+Version: 4.6.8.0  Synopsis: A static website compiler library Description:@@ -140,34 +140,35 @@     Paths_hakyll    Build-Depends:-    base            >= 4      && < 5,-    binary          >= 0.5    && < 0.8,-    blaze-html      >= 0.5    && < 0.9,-    blaze-markup    >= 0.5.1  && < 0.8,-    bytestring      >= 0.9    && < 0.11,-    cmdargs         >= 0.10   && < 0.11,-    containers      >= 0.3    && < 0.6,-    cryptohash      >= 0.7    && < 0.12,-    data-default    >= 0.4    && < 0.6,-    deepseq         >= 1.3    && < 1.5,-    directory       >= 1.0    && < 1.3,-    filepath        >= 1.0    && < 1.5,-    lrucache        >= 1.1.1  && < 1.3,-    mtl             >= 1      && < 2.3,-    network         >= 2.6    && < 2.7,-    network-uri     >= 2.6    && < 2.7,-    old-locale      >= 1.0    && < 1.1,-    old-time        >= 1.0    && < 1.2,-    pandoc          >= 1.12.4 && < 1.14,-    pandoc-citeproc >= 0.4    && < 0.7,-    parsec          >= 3.0    && < 3.2,-    process         >= 1.0    && < 1.3,-    random          >= 1.0    && < 1.2,-    regex-base      >= 0.93   && < 0.94,-    regex-tdfa      >= 1.1    && < 1.3,-    tagsoup         >= 0.13.1 && < 0.14,-    text            >= 0.11   && < 1.3,-    time            >= 1.1    && < 1.6+    base               >= 4       && < 5,+    binary             >= 0.5     && < 0.8,+    blaze-html         >= 0.5     && < 0.9,+    blaze-markup       >= 0.5.1   && < 0.8,+    bytestring         >= 0.9     && < 0.11,+    cmdargs            >= 0.10    && < 0.11,+    containers         >= 0.3     && < 0.6,+    cryptohash         >= 0.7     && < 0.12,+    data-default       >= 0.4     && < 0.6,+    deepseq            >= 1.3     && < 1.5,+    directory          >= 1.0     && < 1.3,+    filepath           >= 1.0     && < 1.5,+    lrucache           >= 1.1.1   && < 1.3,+    mtl                >= 1       && < 2.3,+    network            >= 2.6     && < 2.7,+    network-uri        >= 2.6     && < 2.7,+    old-locale         >= 1.0     && < 1.1,+    old-time           >= 1.0     && < 1.2,+    pandoc             >= 1.12.4  && < 1.14,+    pandoc-citeproc    >= 0.4     && < 0.7,+    parsec             >= 3.0     && < 3.2,+    process            >= 1.0     && < 1.3,+    random             >= 1.0     && < 1.2,+    regex-base         >= 0.93    && < 0.94,+    regex-tdfa         >= 1.1     && < 1.3,+    tagsoup            >= 0.13.1  && < 0.14,+    text               >= 0.11    && < 1.3,+    time               >= 1.1     && < 1.6,+    time-locale-compat >= 0.1.0.0 && < 0.1.1.0    If flag(previewServer)     Build-depends:
src/Hakyll/Core/Util/String.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE FlexibleContexts #-} -------------------------------------------------------------------------------- -- | Miscellaneous string manipulation functions. module Hakyll.Core.Util.String
src/Hakyll/Web/Pandoc.hs view
@@ -49,6 +49,7 @@ readPandocWith ropt item = fmap (reader ropt (itemFileType item)) item   where     reader ro t = case t of+        DocBook            -> readDocBook ro         Html               -> readHtml ro         LaTeX              -> readLaTeX ro         LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t'
src/Hakyll/Web/Pandoc/FileType.hs view
@@ -22,6 +22,7 @@ data FileType     = Binary     | Css+    | DocBook     | Html     | LaTeX     | LiterateHaskell FileType@@ -39,6 +40,7 @@ fileType = uncurry fileType' . splitExtension   where     fileType' _ ".css"      = Css+    fileType' _ ".dbk"      = DocBook     fileType' _ ".htm"      = Html     fileType' _ ".html"     = Html     fileType' f ".lhs"      = LiterateHaskell $ case fileType f of
src/Hakyll/Web/Template/Context.hs view
@@ -23,6 +23,7 @@     , modificationTimeField     , modificationTimeFieldWith     , teaserField+    , teaserFieldWithSeparator     , missingField     ) where @@ -36,7 +37,7 @@ import           Data.Time.Clock               (UTCTime (..)) import           Data.Time.Format              (formatTime, parseTime) import           System.FilePath               (takeBaseName, splitDirectories)-import           System.Locale                 (TimeLocale, defaultTimeLocale)+import           Data.Time.Locale.Compat       (TimeLocale, defaultTimeLocale)   --------------------------------------------------------------------------------@@ -318,9 +319,21 @@ teaserField :: String           -- ^ Key to use             -> Snapshot         -- ^ Snapshot to load             -> Context String   -- ^ Resulting context-teaserField key snapshot = field key $ \item -> do+teaserField = teaserFieldWithSeparator teaserSeparator+++--------------------------------------------------------------------------------+-- | A context with "teaser" key which contain a teaser of the item, defined as+-- the snapshot content before the teaser separator. The item is loaded from the+-- given snapshot (which should be saved in the user code before any templates+-- are applied).+teaserFieldWithSeparator :: String           -- ^ Separator to use+                         -> String           -- ^ Key to use+                         -> Snapshot         -- ^ Snapshot to load+                         -> Context String   -- ^ Resulting context+teaserFieldWithSeparator separator key snapshot = field key $ \item -> do     body <- itemBody <$> loadSnapshot (itemIdentifier item) snapshot-    case needlePrefix teaserSeparator body of+    case needlePrefix separator body of         Nothing -> fail $             "Hakyll.Web.Template.Context: no teaser defined for " ++             show (itemIdentifier item)
src/Hakyll/Web/Template/List.hs view
@@ -22,7 +22,7 @@ import           Control.Monad               (liftM) import           Data.List                   (intersperse, sortBy) import           Data.Ord                    (comparing)-import           System.Locale               (defaultTimeLocale)+import           Data.Time.Locale.Compat     (defaultTimeLocale)   --------------------------------------------------------------------------------