Source

blog / static / code / gitit.hs

import Network.Gitit
import Happstack.Server.SimpleHTTP
import qualified BibtexGitit as BG

main :: IO ()
main = do
    conf <- getConfigFromFile "config"
    createStaticIfMissing conf
    createTemplateIfMissing conf
    createRepoIfMissing conf
    initializeGititState conf
    updateGititState (\s -> s { plugins = plugins s ++ [BG.plugin] })
    simpleHTTP nullConf{port = 5001} $ wiki conf