1-- | A concrete 'ResourceProvider' that gets it's resources from the filesystem
3module Hakyll.Core.ResourceProvider.FileResourceProvider
7import Control.Applicative ((<$>))
9import qualified Data.ByteString.Lazy as LB
11import Hakyll.Core.ResourceProvider
12import Hakyll.Core.Identifier
13import Hakyll.Core.Util.File
14import Hakyll.Core.Configuration
16-- | Create a filesystem-based 'ResourceProvider'
18fileResourceProvider :: HakyllConfiguration -> IO ResourceProvider
19fileResourceProvider configuration = do
20 -- Retrieve a list of identifiers
21 list <- map parseIdentifier . filter (not . ignoreFile configuration) <$>
22 getRecursiveContents False "."
24 -- Construct a resource provider
25 return ResourceProvider
26 { resourceList = map Resource list
27 , resourceString = readFile . toFilePath . unResource
28 , resourceLazyByteString = LB.readFile . toFilePath . unResource
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