summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hakyll.cabal16
-rw-r--r--src/Hakyll/Web/Feed.hs4
-rw-r--r--src/Hakyll/Web/Template/Context.hs15
-rw-r--r--web/examples.markdown9
-rw-r--r--web/releases.markdown14
-rw-r--r--web/templates/default.html1
6 files changed, 46 insertions, 13 deletions
diff --git a/hakyll.cabal b/hakyll.cabal
index c0c5856..7bb79cf 100644
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
Name: hakyll
-Version: 4.7.3.1
+Version: 4.7.5.1
Synopsis: A static website compiler library
Description:
@@ -116,6 +116,7 @@ Library
Hakyll.Web.Tags
Hakyll.Web.Paginate
Hakyll.Web.Template
+ Hakyll.Web.Template.Internal
Hakyll.Web.Template.Context
Hakyll.Web.Template.List
@@ -135,7 +136,6 @@ Library
Hakyll.Core.Store
Hakyll.Core.Util.File
Hakyll.Core.Util.Parser
- Hakyll.Web.Template.Internal
Hakyll.Web.Pandoc.Binary
Paths_hakyll
@@ -156,8 +156,8 @@ Library
mtl >= 1 && < 2.3,
network >= 2.6 && < 2.7,
network-uri >= 2.6 && < 2.7,
- pandoc >= 1.14 && < 1.16,
- pandoc-citeproc >= 0.4 && < 0.9,
+ pandoc >= 1.14 && < 1.17,
+ pandoc-citeproc >= 0.4 && < 0.10,
parsec >= 3.0 && < 3.2,
process >= 1.0 && < 1.3,
random >= 1.0 && < 1.2,
@@ -192,7 +192,7 @@ Library
If flag(checkExternal)
Build-depends:
http-conduit >= 2.1 && < 2.2,
- http-types >= 0.7 && < 0.9
+ http-types >= 0.7 && < 0.10
Cpp-options:
-DCHECK_EXTERNAL
@@ -242,8 +242,8 @@ Test-suite hakyll-tests
mtl >= 1 && < 2.3,
network >= 2.6 && < 2.7,
network-uri >= 2.6 && < 2.7,
- pandoc >= 1.14 && < 1.16,
- pandoc-citeproc >= 0.4 && < 0.9,
+ pandoc >= 1.14 && < 1.17,
+ pandoc-citeproc >= 0.4 && < 0.10,
parsec >= 3.0 && < 3.2,
process >= 1.0 && < 1.3,
random >= 1.0 && < 1.2,
@@ -278,7 +278,7 @@ Test-suite hakyll-tests
If flag(checkExternal)
Build-depends:
http-conduit >= 2.1 && < 2.2,
- http-types >= 0.7 && < 0.9
+ http-types >= 0.7 && < 0.10
Cpp-options:
-DCHECK_EXTERNAL
diff --git a/src/Hakyll/Web/Feed.hs b/src/Hakyll/Web/Feed.hs
index c5f8e0b..1d18430 100644
--- a/src/Hakyll/Web/Feed.hs
+++ b/src/Hakyll/Web/Feed.hs
@@ -76,10 +76,10 @@ renderFeed feedPath itemPath config itemContext items = do
loadTemplate = fmap readTemplate . readFile <=< getDataFileName
itemContext' = mconcat
- [ constField "root" (feedRoot config)
+ [ itemContext
+ , constField "root" (feedRoot config)
, constField "authorName" (feedAuthorName config)
, constField "authorEmail" (feedAuthorEmail config)
- , itemContext
]
feedContext = mconcat
diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs
index 43857ff..6879187 100644
--- a/src/Hakyll/Web/Template/Context.hs
+++ b/src/Hakyll/Web/Template/Context.hs
@@ -21,6 +21,7 @@ module Hakyll.Web.Template.Context
, dateField
, dateFieldWith
, getItemUTC
+ , getItemModificationTime
, modificationTimeField
, modificationTimeFieldWith
, teaserField
@@ -296,6 +297,17 @@ getItemUTC locale id' = do
--------------------------------------------------------------------------------
+-- | Get the time on which the actual file was last modified. This only works if
+-- there actually is an underlying file, of couse.
+getItemModificationTime
+ :: Identifier
+ -> Compiler UTCTime
+getItemModificationTime identifier = do
+ provider <- compilerProvider <$> compilerAsk
+ return $ resourceModificationTime provider identifier
+
+
+--------------------------------------------------------------------------------
modificationTimeField :: String -- ^ Key
-> String -- ^ Format
-> Context a -- ^ Resuting context
@@ -308,8 +320,7 @@ modificationTimeFieldWith :: TimeLocale -- ^ Time output locale
-> String -- ^ Format
-> Context a -- ^ Resulting context
modificationTimeFieldWith locale key fmt = field key $ \i -> do
- provider <- compilerProvider <$> compilerAsk
- let mtime = resourceModificationTime provider $ itemIdentifier i
+ mtime <- getItemModificationTime $ itemIdentifier i
return $ formatTime locale fmt mtime
diff --git a/web/examples.markdown b/web/examples.markdown
index 8e61a9f..61659f5 100644
--- a/web/examples.markdown
+++ b/web/examples.markdown
@@ -9,6 +9,11 @@ interesting resource to learn from as well. If you're using Hakyll for your
site, and the source code is available, please notify me so I can add you to
this list. This list has no particular ordering.
+Note that there is also a [Hakyll CSS garden] which has some themes you can use
+directly with the default Hakyll site.
+
+[Hakyll CSS garden]: http://katychuang.com/hakyll-cssgarden/gallery/
+
## Hakyll 4
- <http://jaspervdj.be/>,
@@ -135,6 +140,10 @@ this list. This list has no particular ordering.
[source](https://github.com/xoltar/xoltar.org)
- <http://sigkill.dk/>
[literate source](http://sigkill.dk/programs/sigkill.html)
+- <http://curry-club-augsburg.de/>,
+ [source](https://github.com/curry-club-aux/curry-club-augsburg.de)
+- <http://ismailmustafa.com/>,
+ [source](https://github.com/ismailmustafa/ismailmustafa.github.io/tree/hakyll)
## Hakyll 3.X
diff --git a/web/releases.markdown b/web/releases.markdown
index 7783ffa..01bf499 100644
--- a/web/releases.markdown
+++ b/web/releases.markdown
@@ -4,6 +4,20 @@ title: Releases
# Releases
+## Hakyll 4.7.5.1
+
+- Bump pandoc and pandoc-citeproc dependencies to 1.16 and 0.9 respectively
+
+## Hakyll 4.7.5.0
+
+- Expose templating engine
+- Fix bug in feed context precedence (contribution by Yuriy Syrovetskiy)
+- Bump http-types dependency to 0.9
+
+## Hakyll 4.7.4.0
+
+- Expose `getItemModificationTime`
+
## Hakyll 4.7.3.1
- Bump pandoc-citeproc dependency to 0.8
diff --git a/web/templates/default.html b/web/templates/default.html
index 891261f..b9fd2ed 100644
--- a/web/templates/default.html
+++ b/web/templates/default.html
@@ -35,7 +35,6 @@
<a href="/tutorials/faq.html">faq</a>
<a href="/examples.html">examples</a>
<a href="/releases.html">releases</a>
- <a href="/hakyll3">Hakyll 3.X</a>
<!-- Flattr button -->
<h1>Donate</h1>