hakyll-4.7.5.1: A static website compiler library

Safe Haskell | None
Language | Haskell98

Hakyll.Core.Metadata

Synopsis

- type Metadata = Map String String
- class Monad m => MonadMetadata m where
  - getMetadata :: Identifier -> m Metadata
  - getMatches :: Pattern -> m [Identifier]
  - getAllMetadata :: Pattern -> m [(Identifier, Metadata)]
- getMetadataField :: MonadMetadata m => Identifier -> String -> m (Maybe String)
- getMetadataField' :: MonadMetadata m => Identifier -> String -> m String
- makePatternDependency :: MonadMetadata m => Pattern -> m Dependency

# Documentation

type Metadata = Map String String Source

class Monad m => MonadMetadata m where Source

Minimal complete definition

getMetadata, getMatches

Methods

getMetadata :: Identifier -> m Metadata Source

getMatches :: Pattern -> m [Identifier] Source

getAllMetadata :: Pattern -> m [(Identifier, Metadata)] Source

Instances

MonadMetadata Compiler Source |
MonadMetadata Rules Source |

getMetadataField :: MonadMetadata m => Identifier -> String -> m (Maybe String) Source

getMetadataField' :: MonadMetadata m => Identifier -> String -> m String Source

Version of `getMetadataField` which throws an error if the field does not exist.

makePatternDependency :: MonadMetadata m => Pattern -> m Dependency Source