Hakyll.Core.Metadata

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

class Monad m => MonadMetadata m where

Minimal complete definition

getMetadata, getMatches

Methods

getMetadata :: Identifier -> m Metadata

getMatches :: Pattern -> m [Identifier]

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

Instances

MonadMetadata Compiler |
MonadMetadata Rules |

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

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

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

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