hakyll-4.16.2.0: A static website compiler library

Safe Haskell | Safe-Inferred
Language | Haskell2010

Hakyll.Web.Template.List

Description

Provides an easy way to combine several items in a list. The applications are obvious:

- A post list on a blog
- An image list in a gallery
- A sitemap

Synopsis

- applyTemplateList :: Template -> Context a -> [Item a] -> Compiler String
- applyJoinTemplateList :: String -> Template -> Context a -> [Item a] -> Compiler String
- chronological :: (MonadMetadata m, MonadFail m) => [Item a] -> m [Item a]
- recentFirst :: (MonadMetadata m, MonadFail m) => [Item a] -> m [Item a]
- sortChronological :: (MonadMetadata m, MonadFail m) => [Identifier] -> m [Identifier]
- sortRecentFirst :: (MonadMetadata m, MonadFail m) => [Identifier] -> m [Identifier]

# Documentation

applyTemplateList :: Template -> Context a -> [Item a] -> Compiler String Source #

Generate a string of a listing of pages, after applying a template to each page.

applyJoinTemplateList :: String -> Template -> Context a -> [Item a] -> Compiler String Source #

Join a listing of pages with a string in between, after applying a template to each page.

chronological :: (MonadMetadata m, MonadFail m) => [Item a] -> m [Item a] Source #

Sort pages chronologically. Uses the same method as `dateField` for extracting the date.

recentFirst :: (MonadMetadata m, MonadFail m) => [Item a] -> m [Item a] Source #

The reverse of `chronological`

sortChronological :: (MonadMetadata m, MonadFail m) => [Identifier] -> m [Identifier] Source #

Version of `chronological` which doesn't need the actual items.

sortRecentFirst :: (MonadMetadata m, MonadFail m) => [Identifier] -> m [Identifier] Source #

Version of `recentFirst` which doesn't need the actual items.