1module Text.Hakyll.Renderables
9import qualified Data.ByteString.Lazy.Char8 as B
10import qualified Data.Map as M
12import Text.Hakyll.Util
13import Text.Hakyll.Page
14import Text.Hakyll.Renderable
16data CustomPage = CustomPage { url :: String,
17 dependencies :: [FilePath],
18 mapping :: [(String, Either String (IO B.ByteString))]
21createCustomPage :: String
23 -> [(String, Either String (IO B.ByteString))]
25createCustomPage = CustomPage
27instance Renderable CustomPage where
28 getDependencies = dependencies
31 values <- mapM (either (return . B.pack) (>>= return) . snd) (mapping page)
32 let keys = map (B.pack . fst) (mapping page)
33 return $ M.fromList $ (B.pack "url", B.pack $ url page) : zip keys values
35data PagePath = PagePath FilePath
37createPagePath :: FilePath -> PagePath
38createPagePath = PagePath
40-- We can render filepaths
41instance Renderable PagePath where
42 getDependencies (PagePath path) = return path
43 getURL (PagePath path) = toURL path
44 toContext (PagePath path) = readPage path >>= toContext
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list