-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A simple static site generator library. -- -- A simple static site generator library , mainly aimed at creating -- blogs. @package hakyll @version 0.3 module Text.Hakyll.Util -- | Trim a string (drop spaces and tabs at both sides). trim :: String -> String -- | Split a list at a certain element. split :: String -> String -> [String] -- | Strip html tags. stripHTML :: String -> String module Text.Hakyll.CompressCSS -- | Compress CSS to speed up your site. compressCSS :: String -> String -- | A module containing various function for manipulating and examinating -- files and directories. module Text.Hakyll.File -- | Convert a relative filepath to a filepath in the destination (_site). toDestination :: FilePath -> FilePath -- | Convert a relative filepath to a filepath in the cache (_cache). toCache :: FilePath -> FilePath -- | Get the url for a given page. toURL :: FilePath -> FilePath -- | Given a path to a file, try to make the path writable by making all -- directories on the path. makeDirectories :: FilePath -> IO () -- | Get all contents of a directory. Note that files starting with a dot -- (.) will be ignored. getRecursiveContents :: FilePath -> IO [FilePath] -- | Check is a cache file is still valid. isCacheValid :: FilePath -> [FilePath] -> IO Bool -- | Perform an IO action on every file in a given directory. directory :: (FilePath -> IO ()) -> FilePath -> IO () module Text.Hakyll.Renderable -- | A class for datatypes that can be rendered to pages. class Renderable a toContext :: (Renderable a) => a -> IO Context getDependencies :: (Renderable a) => a -> [FilePath] getURL :: (Renderable a) => a -> FilePath module Text.Hakyll.Page -- | A Page is basically key-value mapping. Certain keys have special -- meanings, like for example url, body and title. data Page -- | Create a Page from a key-value mapping. fromContext :: (Map ByteString ByteString) -> Page -- | Obtain a value from a page. Will resturn an empty string when nothing -- is found. getValue :: String -> Page -> ByteString -- | Do something with a value of the page. copyValueWith :: String -> String -> (ByteString -> ByteString) -> Page -> Page -- | Get the body for a certain page. When not defined, the body will be -- empty. getBody :: Page -> ByteString -- | Read a page from a file. Metadata is supported, and if the filename -- has a .markdown extension, it will be rendered using pandoc. Note that -- pages are not templates, so they should not contain $identifiers. readPage :: FilePath -> IO Page -- | Write a page to the site destination. writePage :: Page -> IO () instance Renderable Page module Text.Hakyll.Renderables -- | A custom page. data CustomPage -- | Create a custom page. createCustomPage :: String -> [FilePath] -> [(String, Either String (IO ByteString))] -> CustomPage -- | PagePath is a class that wraps a FilePath. This is used to render -- Pages without reading them first through use of caching. data PagePath -- | Create a PagePath from a FilePath. createPagePath :: FilePath -> PagePath instance Renderable PagePath instance Renderable CustomPage -- | Module containing some specialized functions to deal with tags. module Text.Hakyll.Tags -- | Read a tag map. This creates a map from tags to page paths. This -- function assumes the tags are located in the tags metadata field, -- separated by commas. readTagMap :: [FilePath] -> IO (Map String [FilePath]) -- | Render a tag cloud. renderTagCloud :: Map String [FilePath] -> (String -> String) -> Float -> Float -> String module Text.Hakyll.Render -- | Execute an IO action only when the cache is invalid. depends :: FilePath -> [FilePath] -> IO () -> IO () -- | Render to a Page. render :: (Renderable a) => FilePath -> a -> IO Page -- | Render each renderable with the given template, then concatenate the -- result. renderAndConcat :: (Renderable a) => FilePath -> [a] -> IO ByteString -- | Chain a render action for a page with a number of templates. This will -- also write the result to the site destination. This is the preferred -- way to do general rendering. renderChain :: (Renderable a) => [FilePath] -> a -> IO () -- | Mark a certain file as static, so it will just be copied when the site -- is generated. static :: FilePath -> IO () -- | Render a css file, compressing it. css :: FilePath -> IO () -- | Module containing a small, simple http file server for testing and -- preview purposes. module Network.Hakyll.SimpleServer -- | Start a simple http server on the given PortNumber, serving the -- given directory. simpleServer :: PortNumber -> FilePath -> IO () instance Ord Response instance Eq Response instance Ord Request instance Eq Request instance Show ServerConfig instance Eq ServerConfig instance Ord ServerConfig instance Show Response instance Show Request module Text.Hakyll -- | Main function to run hakyll. hakyll :: IO () -> IO ()