panda: A simple static blog engine

[ deprecated, library, web ] [ Propose Tags ]
Deprecated in favor of bamboo

A simple static blog engine

[Skip to Readme]




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.0,,,,,,,,, 2008.9.19, 2008.9.19.1, 2008.9.19.2, 2008.9.20, 2008.9.28, 2008.9.29, 2008.10.11, 2008.10.12, 2008.10.13, 2008.10.14, 2008.10.15, 2008.10.16, 2008.10.17, 2008.10.18, 2008.10.19, 2008.10.21, 2008.10.24, 2008.10.25, 2008.10.26, 2008.10.27, 2008.11.6, 2008.11.7, 2008.12.14, 2008.12.15, 2008.12.16, 2009.1.20, 2009.4.1
Change log
Dependencies base, cgi, containers, data-default (>=0.2), directory, filepath, gravatar (>=0.3), haskell98, hcheat (>=2008.11.6), kibro (>=0.4.2), MissingH, mps (>=2008.11.6), network, old-locale, old-time, pandoc, parsec (>=2), parsedate (>=3000.0.0), process, rss (>=3000.0.1), utf8-string (>=0.3.3), xhtml [details]
License LicenseRef-GPL
Author Wang, Jinjing
Maintainer Wang, Jinjing <>
Category Web
Home page
Uploaded by JinjingWang at 2009-03-31T16:50:17Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 23881 total (54 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for panda-2009.4.1

[back to package description]

Panda: a simple blog engine in Haskell


simple file structure

|---- blog
|     |---- 08-09-01 first post
|     |---- 09-09-02 learn javascript.html
|---- tag
|     |---- programming
|     |---- funny
|---- static
      |---- About

simple config file

blog_title    = C大调
blog_subtitle = 野猫不吃薯片
host_name     =
author_email  =

navigation    = About
per_page      = 7
sidebar       =
favicon       = panda_icon.png

standard web technology

extend/customize with pure css and javascript ( note the custom part in css and js from the last section )

hacker friendly

  • posts are in plain text
  • SCM for publishing / data managing ( not really a feature, but a design goal from the beginning )
  • blindly follows the KISS principle from code to UI: be a simple blog, no more no less



My blog source is available as a git repo:

git clone git://

Or browser online


jinjing's blog config file


Quick setup

install lighttpd

Note: only version 1.4.19 has been successfully tested, 1.4.20 is bugged for reasons unknown.

install ghc

install darcs for cabal-install

install cabal-install

darcs get --partial
cd cabal-install

install panda

cabal update; cabal install panda


# panda is a kibro project
kibro new myblog
cd myblog

# get a template to start
git clone git:// db
sh db/extra/scripts/


kibro start

It should be running on now.

Since Panda is based on Kibro, it helps to read how Kibro works.


Install Ruby / Rake, then rake -T to see a list of helper commands.


Edit db/config/site.txt

blog_title   = My shiny blog
host_name    =
author_email =

Restart required. (hint: rake r)

User's guide


All posts are placed in db/blog folder, with naming convention [yy-mm-dd title], in Markdown format by default.

Markdown supports embedding HTML snippets, so embedding youtube video is a peace of cake.

You can create static pages, in db/static, and link to them via /static/static_file_name inside your blogs.

For example db/static/About, where you can put some profile in.


Create a file in db/tag, the name of the file will be the name of the new tag. edit the tag file, insert the full name of a blog post, e.g. 08-09-04 Welcome to Panda

html / tex / restructured text format

Just create the file in blog as usual with an extension (e.g. html, rst, tex ), and you are all set.

customize navigation bar

see example in config/site:

navigation = About, Gallery

Multiple renderer supported, use extension as hints.

Note, the navigation configuration requires the full name of your static page, so you should include extension in configuration as well.

customize sidebar

see example in config/site, config/sidebar/

sidebar    =

Sidebar items are html snippets plugged into view. You can create these plugins in multiple formats, use extension.


Styling is done by editing public/theme/blueprint/css/custom.css, see the default custom.css for inspiration.


New theme can be created without touching Panda code, example blueprint theme in db/config/theme/blueprint.txt

container  = container
header     = column span-12 first
navigation = column span-12 first large
main       = column span-9 first
sidebar    = column span-3 last
footer     = footer

css        = screen, blueprint-wp, custom
js         = jquery-1.2.6.min, jquery.getUrlParam, jquery.highlight-2, custom

These are custom class names for each element block.

You can create new themes by adding theme definition files in db/config/theme, put theme resources under db/public/theme/your_theme_name and place

theme = your_new_theme

inside site.txt.

note: css and js are required to be placed under db/public/theme/your_theme_name/css and db/public/theme/your_theme_name/js, leave out the file extensions in site.txt.

syntax highlighting

  type="text/html" \
  data=" \
  ?user_id=56167317@N00&tags=cat-hack" \
  width="500" height="500">

Highlight for HTML is enabled by default, see public/theme/blueprint/js/custom.js for more language support.

Highlight style is configured at config/theme/blueprint.txt, just change highlight/default to any css inside theme/blueprint/css/highlight.


Google analytics is available, put your tracker_id in site.txt, if you don't want analytics, ignore the setting.

Once site module is introduced, those js code could be configured to be gone forever, but not yet in the current release.

final note

try to use <h3> for heading in your posts, at least wordpress is using this convention. <h1> is not styled in the blueprint theme, so they look kind of unfitted. But this does not stop anyone from styling <h1>, <h2> if wished.