hakyll 3.4.1.0 → 3.4.2.0
raw patch · 5 files changed
+30/−16 lines, 5 filesdep ~bytestringdep ~directory
Dependency ranges changed: bytestring, directory
Files
- hakyll.cabal +8/−8
- src/Hakyll/Core/Compiler.hs +6/−2
- src/Hakyll/Core/Configuration.hs +5/−2
- src/Hakyll/Core/Routes.hs +2/−2
- src/Hakyll/Web/Tags.hs +9/−2
hakyll.cabal view
@@ -1,5 +1,5 @@ Name: hakyll-Version: 3.4.1.0+Version: 3.4.2.0 Synopsis: A static website compiler library Description:@@ -68,13 +68,14 @@ binary >= 0.5 && < 0.6, blaze-html >= 0.5 && < 0.6, blaze-markup >= 0.5.1 && < 0.6,- bytestring >= 0.9 && < 0.10,+ bytestring >= 0.9 && < 0.11, citeproc-hs >= 0.3.2 && < 0.4, containers >= 0.3 && < 0.6, cryptohash >= 0.7 && < 0.8,- directory >= 1.0 && < 1.2,+ directory >= 1.0 && < 1.3, filepath >= 1.0 && < 1.4, hamlet >= 1.0 && < 1.2,+ lrucache >= 1.1.1 && < 1.2, mtl >= 1 && < 2.2, old-locale >= 1.0 && < 1.1, old-time >= 1.0 && < 1.2,@@ -85,8 +86,7 @@ regex-tdfa >= 1.1 && < 1.2, tagsoup >= 0.12.6 && < 0.13, text >= 0.11 && < 1.12,- time >= 1.1 && < 1.5,- lrucache >= 1.1.1 && < 1.2+ time >= 1.1 && < 1.5 Exposed-Modules: Hakyll@@ -176,13 +176,14 @@ binary >= 0.5 && < 0.6, blaze-html >= 0.5 && < 0.6, blaze-markup >= 0.5.1 && < 0.6,- bytestring >= 0.9 && < 0.10,+ bytestring >= 0.9 && < 0.11, citeproc-hs >= 0.3.2 && < 0.4, containers >= 0.3 && < 0.6, cryptohash >= 0.7 && < 0.8,- directory >= 1.0 && < 1.2,+ directory >= 1.0 && < 1.3, filepath >= 1.0 && < 1.4, hamlet >= 1.0 && < 1.2,+ lrucache >= 1.1.1 && < 1.2, mtl >= 1 && < 2.2, old-locale >= 1.0 && < 1.1, old-time >= 1.0 && < 1.2,@@ -194,7 +195,6 @@ tagsoup >= 0.12.6 && < 0.13, text >= 0.11 && < 1.12, time >= 1.1 && < 1.5,- lrucache >= 1.1.1 && < 1.2, unix >= 2.4 && < 2.6 Other-modules:
src/Hakyll/Core/Compiler.hs view
@@ -124,6 +124,7 @@ import Control.Monad.Error (throwError) import Control.Category (Category, (.), id) import Data.List (find)+import System.Environment (getProgName) import System.FilePath (takeExtension) import Data.Binary (Binary)@@ -305,6 +306,7 @@ identifier <- castIdentifier . compilerIdentifier <$> ask store <- compilerStore <$> ask modified <- compilerResourceModified <$> ask+ progName <- liftIO getProgName report logger $ "Checking cache: " ++ if modified then "modified" else "OK" if modified then do v <- unCompilerM $ j $ fromIdentifier identifier@@ -312,9 +314,11 @@ return v else do v <- liftIO $ storeGet store name identifier case v of Found v' -> return v'- _ -> throwError error'+ _ -> throwError (error' progName) where- error' = "Hakyll.Core.Compiler.cached: Cache corrupt!"+ error' progName =+ "Hakyll.Core.Compiler.cached: Cache corrupt! " +++ "Try running: " ++ progName ++ " clean" -- | Create an unsafe compiler from a function in IO --
src/Hakyll/Core/Configuration.hs view
@@ -20,6 +20,8 @@ -- -- * files starting with a @.@ --+ -- * files starting with a @#@+ -- -- * files ending with a @~@ -- -- * files ending with @.swp@@@ -57,8 +59,9 @@ } where ignoreFile' path- | "." `isPrefixOf` fileName = True- | "~" `isSuffixOf` fileName = True+ | "." `isPrefixOf` fileName = True+ | "#" `isPrefixOf` fileName = True+ | "~" `isSuffixOf` fileName = True | ".swp" `isSuffixOf` fileName = True | otherwise = False where
src/Hakyll/Core/Routes.hs view
@@ -69,7 +69,7 @@ -- -- Example: ----- > runRoute (setExtension "html") "foo/bar"+-- > runRoutes (setExtension "html") "foo/bar" -- -- Result: --@@ -77,7 +77,7 @@ -- -- Example: ----- > runRoute (setExtension "html") "posts/the-art-of-trolling.markdown"+-- > runRoutes (setExtension "html") "posts/the-art-of-trolling.markdown" -- -- Result: --
src/Hakyll/Web/Tags.hs view
@@ -28,12 +28,14 @@ {-# LANGUAGE DeriveDataTypeable, OverloadedStrings, Arrows #-} module Hakyll.Web.Tags ( Tags (..)+ , getTags , readTagsWith , readTags , readCategory , renderTagCloud , renderTagList , renderTagsField+ , renderTagsFieldWith , renderCategoryField , sortTagsBy , caseInsensitiveTags@@ -78,7 +80,8 @@ instance Writable (Tags a) where write _ _ = return () --- | Obtain tags from a page+-- | Obtain tags from a page in the default way: parse them from the @tags@+-- metadata field. -- getTags :: Page a -> [String] getTags = map trim . splitAll "," . getField "tags"@@ -176,7 +179,11 @@ makeLink tag url count _ _ = renderHtml $ H.a ! A.href (toValue url) $ toHtml (tag ++ " (" ++ show count ++ ")") --- | Render tags with links+-- | Render tags with links with custom function to get tags. It is typically+-- together with 'getTags' like this:+-- +-- > renderTagsFieldWith (customFunction . getTags)+-- > "tags" (fromCapture "tags/*") -- renderTagsFieldWith :: (Page a -> [String]) -- ^ Function to get the tags -> String -- ^ Destination key