on ea1bb41 help sign in
hakyll/src/Text/Hakyll/Renderable.hs
18 lines 559 B history raw
1module Text.Hakyll.Renderable
2 ( Renderable(toContext, getDependencies, getUrl)
3 ) where
5import Text.Hakyll.Hakyll (Hakyll)
6import Text.Hakyll.Context (Context)
8-- | A class for datatypes that can be rendered to pages.
9class Renderable a where
10 -- | Get a context to do substitutions with.
11 toContext :: a -> Hakyll Context
13 -- | Get the dependencies for the renderable. This is used for cache
14 -- invalidation.
15 getDependencies :: a -> [FilePath]
17 -- | Get the destination for the renderable.
18 getUrl :: a -> Hakyll FilePath