Hakyll.Core.Metadata

hakyll-4.9.5.1: A static website compiler library

Safe Haskell | None
Language | Haskell98

Hakyll.Core.Metadata

Synopsis

- type Metadata = Object
- lookupString :: String -> Metadata -> Maybe String
- lookupStringList :: String -> Metadata -> Maybe [String]
- class Monad m => MonadMetadata m where
- getMetadataField :: MonadMetadata m => Identifier -> String -> m (Maybe String)
- getMetadataField' :: MonadMetadata m => Identifier -> String -> m String
- makePatternDependency :: MonadMetadata m => Pattern -> m Dependency
- newtype BinaryMetadata = BinaryMetadata {
  - unBinaryMetadata :: Metadata
  }

# Documentation

type Metadata = Object #

lookupString :: String -> Metadata -> Maybe String #

lookupStringList :: String -> Metadata -> Maybe [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 # |
Methods getMetadata :: Identifier -> Compiler Metadata # getMatches :: Pattern -> Compiler [Identifier] # getAllMetadata :: Pattern -> Compiler [(Identifier, Metadata)] #
MonadMetadata Rules # |
Methods getMetadata :: Identifier -> Rules Metadata # getMatches :: Pattern -> Rules [Identifier] # getAllMetadata :: Pattern -> Rules [(Identifier, Metadata)] #

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 #

newtype BinaryMetadata #

Newtype wrapper for serialization.

Constructors

BinaryMetadata |
Fields unBinaryMetadata :: Metadata

Instances

Binary BinaryMetadata # |
Methods put :: BinaryMetadata -> Put # get :: Get BinaryMetadata # putList :: [BinaryMetadata] -> Put #