diff options
-rw-r--r-- | hakyll.cabal | 4 | ||||
-rw-r--r-- | src/Hakyll.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Web/Feed.hs | 6 | ||||
-rw-r--r-- | tests/Hakyll/Web/Page/Metadata/Tests.hs | 9 |
4 files changed, 16 insertions, 5 deletions
diff --git a/hakyll.cabal b/hakyll.cabal index b0a3e34..9a41882 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -1,5 +1,5 @@ Name: hakyll -Version: 3.2.5.0 +Version: 3.2.5.1 Synopsis: A static website compiler library Description: @@ -73,7 +73,7 @@ Library old-locale >= 1.0 && < 2.0, old-time >= 1.0 && < 1.3, pandoc >= 1.6 && < 2.0, - parsec >= 2.1 && < 3.2, + parsec >= 3.0 && < 3.2, process >= 1.0 && < 1.4, regex-base >= 0.93 && < 1.0, regex-pcre >= 0.93 && < 1.0, diff --git a/src/Hakyll.hs b/src/Hakyll.hs index 3f258b7..9dd10a0 100644 --- a/src/Hakyll.hs +++ b/src/Hakyll.hs @@ -31,6 +31,7 @@ module Hakyll , module Hakyll.Web.Urls.Relativize , module Hakyll.Web.Tags , module Hakyll.Web.Template + , module Hakyll.Web.Template.Read , module Hakyll.Web.Util.Html ) where @@ -64,4 +65,5 @@ import Hakyll.Web.Urls import Hakyll.Web.Urls.Relativize import Hakyll.Web.Tags import Hakyll.Web.Template +import Hakyll.Web.Template.Read import Hakyll.Web.Util.Html diff --git a/src/Hakyll/Web/Feed.hs b/src/Hakyll/Web/Feed.hs index 77c97d3..f64bb55 100644 --- a/src/Hakyll/Web/Feed.hs +++ b/src/Hakyll/Web/Feed.hs @@ -7,11 +7,11 @@ -- Also note that the pages should have (at least) the following fields to -- produce a correct feed: -- --- - @$title@: Title of the item +-- - @$title$@: Title of the item -- --- - @$description@: Description to appear in the feed +-- - @$description$@: Description to appear in the feed -- --- - @$url@: URL to the item - this is usually set automatically. +-- - @$url$@: URL to the item - this is usually set automatically. -- -- In addition, the posts should be named according to the rules for -- 'Hakyll.Page.Metadata.renderDateField'. diff --git a/tests/Hakyll/Web/Page/Metadata/Tests.hs b/tests/Hakyll/Web/Page/Metadata/Tests.hs index 6fbd89a..f14bfec 100644 --- a/tests/Hakyll/Web/Page/Metadata/Tests.hs +++ b/tests/Hakyll/Web/Page/Metadata/Tests.hs @@ -42,6 +42,15 @@ tests = concat $ setFieldA "bar" (map toLower) (mempty, "FOO") ] + , fromAssertions "renderDateField" + [ (@=?) "January 31, 2010" $ getField "date" $ renderDateField + "date" "%B %e, %Y" "Date unknown" $ Page + (M.singleton "path" "/posts/2010-01-31-a-post.mkdwn") "" + , (@=?) "Date unknown" $ getField "date" $ renderDateField + "date" "%B %e, %Y" "Date unknown" $ Page + (M.singleton "path" "/posts/a-post.mkdwn") "" + ] + , fromAssertions "copyBodyToField" [ (Page (M.singleton "bar" "foo") "foo") @=? copyBodyToField "bar" (Page M.empty "foo") |