hakyll 4.7.0.0 → 4.7.1.0
raw patch · 6 files changed
+97/−88 lines, 6 filesdep −old-localedep −old-timedep −time-locale-compatdep ~timePVP ok
version bump matches the API change (PVP)
Dependencies removed: old-locale, old-time, time-locale-compat
Dependency ranges changed: time
API changes (from Hackage documentation)
+ Hakyll.Web.Pandoc.Biblio: pandocBiblioCompiler :: String -> String -> Compiler (Item String)
+ Hakyll.Web.Pandoc.FileType: MediaWiki :: FileType
Files
- hakyll.cabal +53/−59
- src/Hakyll/Web/Pandoc.hs +1/−0
- src/Hakyll/Web/Pandoc/Biblio.hs +13/−2
- src/Hakyll/Web/Pandoc/FileType.hs +23/−20
- src/Hakyll/Web/Template/Context.hs +6/−6
- src/Hakyll/Web/Template/List.hs +1/−1
hakyll.cabal view
@@ -1,5 +1,5 @@ Name: hakyll-Version: 4.7.0.0+Version: 4.7.1.0 Synopsis: A static website compiler library Description:@@ -140,35 +140,32 @@ 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.14 && < 1.15,- pandoc-citeproc >= 0.4 && < 0.8,- 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+ 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,+ pandoc >= 1.14 && < 1.15,+ pandoc-citeproc >= 0.4 && < 0.8,+ 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.5 && < 1.6 If flag(previewServer) Build-depends:@@ -228,35 +225,32 @@ test-framework-hunit >= 0.3 && < 0.4, test-framework-quickcheck2 >= 0.3 && < 0.4, -- Copy pasted from hakyll dependencies:- 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.14 && < 1.15,- pandoc-citeproc >= 0.4 && < 0.8,- 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+ 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,+ pandoc >= 1.14 && < 1.15,+ pandoc-citeproc >= 0.4 && < 0.8,+ 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.5 && < 1.6 If flag(previewServer) Build-depends:
src/Hakyll/Web/Pandoc.hs view
@@ -63,6 +63,7 @@ LaTeX -> readLaTeX ro LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t' Markdown -> readMarkdown ro+ MediaWiki -> readMediaWiki ro OrgMode -> readOrg ro Rst -> readRST ro Textile -> readTextile ro
src/Hakyll/Web/Pandoc/Biblio.hs view
@@ -4,9 +4,11 @@ -- In order to add a bibliography, you will need a bibliography file (e.g. -- @.bib@) and a CSL file (@.csl@). Both need to be compiled with their -- respective compilers ('biblioCompiler' and 'cslCompiler'). Then, you can--- refer to these files when you use 'pageReadPandocBiblio'. This function also+-- refer to these files when you use 'readPandocBiblio'. This function also -- takes the reader options for completeness -- you can use -- 'defaultHakyllReaderOptions' if you're unsure.+-- 'pandocBiblioCompiler' is a convenience wrapper which works like 'pandocCompiler',+-- but also takes paths to compiled bibliography and csl files. {-# LANGUAGE Arrows #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}@@ -16,13 +18,15 @@ , Biblio (..) , biblioCompiler , readPandocBiblio+ , pandocBiblioCompiler ) where -------------------------------------------------------------------------------- import Control.Applicative ((<$>))-import Control.Monad (replicateM)+import Control.Monad (replicateM, liftM) import Data.Binary (Binary (..))+import Data.Default (def) import Data.Typeable (Typeable) import qualified Text.CSL as CSL import Text.CSL.Pandoc (processCites)@@ -105,3 +109,10 @@ return $ fmap (const pandoc') item +--------------------------------------------------------------------------------+pandocBiblioCompiler :: String -> String -> Compiler (Item String)+pandocBiblioCompiler cslFileName bibFileName = do+ csl <- load $ fromFilePath cslFileName+ bib <- load $ fromFilePath bibFileName+ liftM writePandoc+ (getResourceBody >>= readPandocBiblio def csl bib)
src/Hakyll/Web/Pandoc/FileType.hs view
@@ -27,6 +27,7 @@ | LaTeX | LiterateHaskell FileType | Markdown+ | MediaWiki | OrgMode | PlainText | Rst@@ -39,30 +40,32 @@ fileType :: FilePath -> FileType 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+ fileType' _ ".css" = Css+ fileType' _ ".dbk" = DocBook+ fileType' _ ".htm" = Html+ fileType' _ ".html" = Html+ fileType' f ".lhs" = LiterateHaskell $ case fileType f of -- If no extension is given, default to Markdown + LiterateHaskell Binary -> Markdown -- Otherwise, LaTeX + LiterateHaskell or whatever the user specified x -> x- fileType' _ ".markdown" = Markdown- fileType' _ ".md" = Markdown- fileType' _ ".mdn" = Markdown- fileType' _ ".mdown" = Markdown- fileType' _ ".mdwn" = Markdown- fileType' _ ".mkd" = Markdown- fileType' _ ".mkdwn" = Markdown- fileType' _ ".org" = OrgMode- fileType' _ ".page" = Markdown- fileType' _ ".rst" = Rst- fileType' _ ".tex" = LaTeX- fileType' _ ".text" = PlainText- fileType' _ ".textile" = Textile- fileType' _ ".txt" = PlainText- fileType' _ _ = Binary -- Treat unknown files as binary+ fileType' _ ".markdown" = Markdown+ fileType' _ ".mediawiki" = MediaWiki+ fileType' _ ".md" = Markdown+ fileType' _ ".mdn" = Markdown+ fileType' _ ".mdown" = Markdown+ fileType' _ ".mdwn" = Markdown+ fileType' _ ".mkd" = Markdown+ fileType' _ ".mkdwn" = Markdown+ fileType' _ ".org" = OrgMode+ fileType' _ ".page" = Markdown+ fileType' _ ".rst" = Rst+ fileType' _ ".tex" = LaTeX+ fileType' _ ".text" = PlainText+ fileType' _ ".textile" = Textile+ fileType' _ ".txt" = PlainText+ fileType' _ ".wiki" = MediaWiki+ fileType' _ _ = Binary -- Treat unknown files as binary --------------------------------------------------------------------------------
src/Hakyll/Web/Template/Context.hs view
@@ -29,15 +29,15 @@ ---------------------------------------------------------------------------------import Control.Applicative (Alternative (..), (<$>), pure)+import Control.Applicative (Alternative (..), pure, (<$>)) import Control.Monad (msum) import Data.List (intercalate) import qualified Data.Map as M import Data.Monoid (Monoid (..)) import Data.Time.Clock (UTCTime (..))-import Data.Time.Format (formatTime, parseTime)-import System.FilePath (takeBaseName, splitDirectories)-import Data.Time.Locale.Compat (TimeLocale, defaultTimeLocale)+import Data.Time.Format (TimeLocale, defaultTimeLocale,+ formatTime, parseTime)+import System.FilePath (splitDirectories, takeBaseName) --------------------------------------------------------------------------------@@ -47,7 +47,7 @@ import Hakyll.Core.Item import Hakyll.Core.Metadata import Hakyll.Core.Provider-import Hakyll.Core.Util.String (splitAll, needlePrefix)+import Hakyll.Core.Util.String (needlePrefix, splitAll) import Hakyll.Web.Html @@ -238,7 +238,7 @@ -- Alternatively, when the metadata has a field called @path@ in a -- @folder/yyyy-mm-dd-title.extension@ format (the convention for pages) -- and no @published@ metadata field set, this function can render--- the date. This pattern matches the file name or directory names +-- the date. This pattern matches the file name or directory names -- that begins with @yyyy-mm-dd@ . For example: -- @folder//yyyy-mm-dd-title//dist//main.extension@ . -- In case of multiple matches, the rightmost one is used.
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 Data.Time.Locale.Compat (defaultTimeLocale)+import Data.Time.Format (defaultTimeLocale) --------------------------------------------------------------------------------