moduleText.Hakyll.Renderables(CustomPage,createCustomPage,PagePath,createPagePath)whereimportSystem.FilePath(FilePath)importqualifiedData.ByteString.Lazy.Char8asBimportqualifiedData.MapasMimportText.Hakyll.PageimportText.Hakyll.RenderableimportText.Hakyll.File-- | A custom page.dataCustomPage=CustomPage{url::String,dependencies::[FilePath],mapping::[(String,EitherString(IOB.ByteString))]}-- | Create a custom page.createCustomPage::String-- ^ Destination of the page, relative to _site.->[FilePath]-- ^ Dependencies of the page.->[(String,EitherString(IOB.ByteString))]-- ^ Key - value mapping for rendering.->CustomPagecreateCustomPage=CustomPageinstanceRenderableCustomPagewheregetDependencies=dependenciesgetURL=urltoContextpage=dovalues<-mapM(either(return.B.pack)(>>=return).snd)(mappingpage)letkeys=map(B.pack.fst)(mappingpage)return$M.fromList$(B.pack"url",B.pack$urlpage):zipkeysvalues-- | PagePath is a class that wraps a FilePath. This is used to render Pages-- without reading them first through use of caching.dataPagePath=PagePathFilePath-- | Create a PagePath from a FilePath.createPagePath::FilePath->PagePathcreatePagePath=PagePath-- We can render filepathsinstanceRenderablePagePathwheregetDependencies(PagePathpath)=returnpathgetURL(PagePathpath)=toURLpathtoContext(PagePathpath)=readPagepath>>=toContext