Readme for panda-2008.10.11

Panda - simple blogging engine

Sample file db structure

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

Why

Quick Demo

It powers my blog ;)

Note: the demo might run on an experimental branch, so differences from the cabal version could occur.

Install

install lighttpd

install panda

cabal install panda

bootstrap

# panda is a kibro project
kibro new myblog
cd myblog

# get a template to start
rm -r db; rm -r public
git clone git://github.com/nfjinjing/panda-template.git db
sh db/extra/scripts/bootstrap.sh

run

kibro start

It should be running on http://127.0.0.1:3000 now.

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

Goodies

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

Config

Edit db/config/site.txt

blog_title   = My shiny blog
host_name    = yourhost.com
author_email = your_mail@yourhost.com

Restart required. (hint: rake r)

Theme

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

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 too, since the engine will fill it for you.

You can create new themes by adding theme files in db/config/theme, and place

theme = your_new_theme

inside site.txt.

Hacking

Another way to get Panda running with source is:

# clone the source
git clone git://github.com/nfjinjing/panda.git myblog
cd myblog

# get a template to start
git clone git://github.com/nfjinjing/panda-template.git db

# manually adjust path information for lighttpd
# edit first 6 lines of app/lighttpd/lighttpd.conf to match your path

# manual staging
ln -s db/public public

# run
kibro start

I'm heavily using the MPS package which introduces things like

reject, join, belongs_to, match, gsub

and so on.

If the latest git version doesn't build, try ghc-pkg unregister cgi-3001.1.7.0 --user.