hakyll-4.9.5.0: A static website compiler library

Safe Haskell | None
Language | Haskell98

Hakyll.Web.Paginate

Synopsis

- type PageNumber = Int
- data Paginate = Paginate {
  - paginateMap :: Map PageNumber [Identifier]
  - paginateMakeId :: PageNumber -> Identifier
  - paginateDependency :: Dependency
  }
- buildPaginateWith :: MonadMetadata m => ([Identifier] -> m [[Identifier]]) -> Pattern -> (PageNumber -> Identifier) -> m Paginate
- paginateEvery :: Int -> [a] -> [[a]]
- paginateRules :: Paginate -> (PageNumber -> Pattern -> Rules ()) -> Rules ()
- paginateContext :: Paginate -> PageNumber -> Context a

# Documentation

type PageNumber = Int #

data Paginate #

Data about paginators

Constructors

Paginate |
Fields paginateMap :: Map PageNumber [Identifier] paginateMakeId :: PageNumber -> Identifier paginateDependency :: Dependency

buildPaginateWith #

Arguments

:: MonadMetadata m |
=> ([Identifier] -> m [[Identifier]]) | Group items into pages
-> Pattern | Select items to paginate
-> (PageNumber -> Identifier) | Identifiers for the pages
-> m Paginate |

paginateEvery :: Int -> [a] -> [[a]] #

paginateRules :: Paginate -> (PageNumber -> Pattern -> Rules ()) -> Rules () #

paginateContext :: Paginate -> PageNumber -> Context a #

A default paginate context which provides the following keys: