packages feed

panda-0.0.0.3: readme.markdown

Panda static blogging engine
==============================

Sample file db structure
-------------------------

    db
    |---- blog
    |     |---- 08-09-01 first post
    |     |---- 09-09-02 learn javascript
    |
    |---- tag
          |---- programming
          |---- funny

Why
----

* Blog entries are stored locally in markdown format ( can be changed easily with more hacking )
* Remote server is a mirror of local repository
* No server side API for publishing / editing, just use Darcs, Git or any SCM
* No need to find external hosting of your videos, images or sound. Put them in public folder ( still managed by SCM if you wish )
* Embed any HTML snippets
* Statically typed HTML combinator = valid html
* Based on Kibro
* Freshman level MVC design

Quick Demo
-----------

It powers [my blog](http://jinjing.blog.easymic.com) ;)

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

Panda is in its early stage. I got tired of importing / exporting blogs when switching blogging platforms, 
I needed a way to not be bounded to any service API, and that's the main design goal for Panda. There's no theming yet
(except that you wish to hack the source).

The main benefit is that if I ever wanted to stop using Panda, all my blogs and resources are in manageable states.

Install
--------

### install [lighttpd](http://www.lighttpd.net/ )


### 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/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](http://chrisdone.com/blog/2008/08/06/kibro-haskell-lighttpd-and-fastcgi/) 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`)


Future
------

The template db is just a starting point for you to experiment on. However, I would encourage you to keep your own db in your own SCM, that way, you will never lose your data and never have to care about application logic again.

There are many things could be done. Whatever there will be, the key idea is simplest data / folder structure, absolutely no parsing, no xml, no code is data like and stuff :)

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](http://github.com/nfjinjing/mps/tree/master ) package which introduces things like

    reject, join, belongs_to, match, gsub
    
and so on.