summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2013-03-16 12:53:54 +0200
committerSimonas Kazlauskas <git@kazlauskas.me>2013-03-16 12:53:54 +0200
commit4a3aac547a04c78bf01b68d1b2296ae85aa0c6ea (patch)
tree14d6a124d13f9131c3e265606b4444994baef4ad /src
parenta72906095c1ea7b2d24ca4368f8165f15ac22059 (diff)
downloadhakyll-4a3aac547a04c78bf01b68d1b2296ae85aa0c6ea.tar.gz
`chronological` docs update
`chronological` now respects metadata too and uses same method as dateField to get date for sorting.
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Web/Template/List.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Hakyll/Web/Template/List.hs b/src/Hakyll/Web/Template/List.hs
index 8eadd53..f9ccc08 100644
--- a/src/Hakyll/Web/Template/List.hs
+++ b/src/Hakyll/Web/Template/List.hs
@@ -55,9 +55,8 @@ applyJoinTemplateList delimiter tpl context items = do
--------------------------------------------------------------------------------
--- | Sort pages chronologically. This function assumes that the pages have a
--- @year-month-day-title.extension@ naming scheme -- as is the convention in
--- Hakyll.
+-- | Sort pages chronologically. Uses the same method as 'dateField' for
+-- extracting the date.
chronological :: MonadMetadata m => [Item a] -> m [Item a]
chronological =
sortByM $ getItemUTC defaultTimeLocale . itemIdentifier