A simple blog tool written with Haskell.
%git clone git://github.com/nsyee/tinyblog.git
%cd tinyblog
%runghc Setup.hs configure
%runghc Setup.hs build
%runghc Setup.hs install
-- myapp.hs
module Main where
import TinyBlog
import Hack.Handler.SimpleServer -- use any Hack.Handler you like.
main :: IO ()
main = do
let cfg = Config
{ cBlogName = "Sample Blog" -- ^ blog name
, cHostName = "sample.com"-- ^ host name
, cAuthorName = "your name"-- ^ author name
, cCopyright = "copyright 2010 foo name all rights reserved." -- ^ copyright
, cEmail = "[email protected]" -- ^ email
, cDescription = "On Loving Lambda" -- ^ description of this blog
, cUseGravatar = True -- ^ use gravatar image or not (http://gravatar.com)
}
let port = 3000 -- port number
run port $ TinyBlog.app cfg
-- /myapp.hs
%ghc --make myapp.hs
%./myapp
check: http://localhost:3000
- tinyblog is using loli (Web Application Framework).