hakyll- A simple static site generator library.



This module provides an API for resource providers. Resource providers allow Hakyll to get content from resources; the type of resource depends on the concrete instance.

A resource is represented by the Resource type. This is basically just a newtype wrapper around Identifier -- but it has an important effect: it guarantees that a resource with this identifier can be provided by one or more resource providers.

Therefore, it is not recommended to read files directly -- you should use the provided Resource methods.



newtype Resource Source

A resource

Invariant: the resource specified by the given identifier must exist



data ResourceProvider Source

A value responsible for retrieving and listing resources




resourceList :: [Resource]

A list of all resources this provider is able to provide

resourceString :: Resource -> IO String

Retrieve a certain resource as string

resourceLazyByteString :: Resource -> IO ByteString

Retrieve a certain resource as lazy bytestring

resourceExists :: ResourceProvider -> Identifier -> BoolSource

Check if a given identifier has a resource

resourceDigest :: ResourceProvider -> Resource -> IO [Word8]Source

Retrieve a digest for a given resource

resourceModified :: ResourceProvider -> Resource -> Store -> IO BoolSource

Check if a resource was modified