A simple static blog engine http://www.haskell.org/haskellwiki/Panda
|Latest on Hackage:||2009.4.1|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Panda: a simple blog engine in Haskell
simple file structure
simple config file
blog_title = C大调 blog_subtitle = 野猫不吃薯片 host_name = jinjing.blog.easymic.com author_email = email@example.com navigation = About per_page = 7 sidebar = Blogroll.md favicon = panda_icon.png
standard web technology
- 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://github.com/nfjinjing/jinjing-blog.git
Or browser online
Note: only version 1.4.19 has been successfully tested, 1.4.20 is bugged for reasons unknown.
install darcs for
darcs get --partial http://darcs.haskell.org/cabal-install/ cd cabal-install sh bootstrap.sh
cabal update; cabal install panda
# panda is a kibro project kibro new myblog cd myblog # get a template to start git clone git://github.com/nfjinjing/panda-template.git db sh db/extra/scripts/bootstrap.sh
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.
rake -T to see a list of helper commands.
blog_title = My shiny blog host_name = yourhost.com author_email = firstname.lastname@example.org
Restart required. (hint:
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.
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
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.
see example in
sidebar = Blogroll.md
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
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
js are required to be placed under
db/public/theme/your_theme_name/js, leave out the file extensions in
<object type="text/html" \ data="http://www.flickr.com/slideShow/index.gne \ ?user_id=56167317@N00&tags=cat-hack" \ width="500" height="500"> </object>
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
Google analytics is available, put your
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.
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.
- this is not a joke
- unicode search
- auto add "http://" for the link-field in comments
All the documentation has been moved into a single readme.md file.
Add more modules in panda.cabal
Parallel processing ready
resource with file extension shows correctly
Photo album plugin
- Use HCheat
- Use MPSUTF8 for utf8 wrapper
- Use kibro 0.4.2
Work with utf8-string 0.3.2
Missing type/extension.hs in cabal
Modular system: search, comment, analytics are now extensions that can be disabled / enabled
- backward compatible with old comment format, no migration required as in 2008.10.24
- works with kibro 4.1
- empty field for simple anti-spam
- gravatar support in comment
- dynamic simple math human test
comment is in a new format not compatible with older version. I made a mistake in designing the comment file format, it's now in 2 files. One contains the comment body, the other contains the comment meta data.
next page link works in if mounted on a directory, e.g. /blog
- Pretty URLs
- Configurable date format for plain text
Comment works with multiple lines... ( fixed in mps )
Works with kibro 0.3
link within RSS
RSS link for root
- RSS link in header
- pagination link
configurable root_path for
navigation style typo
Proper title in header
Change to GPL ( since panda links to GPL libraries )
Text based theme
- Add favicon config
- Add google analytics config
Relax GHC package dependencies
Add Type.Sidebar dependency
Leave comment in utf-8 posts
- Comment system
- Change version schema
uniform unicode handling ( byte8 internal, utf-8 IO )
UTF8 bug fix release
Support HTML, reStructuredText and LaTeX in addition to Markdown, just add a the appropriate file extension, no extension defaults to Markdown
cabal dependency on parsec
HaXml 0.13 and
RSS 3000.0.1 for
configurable navigation menu in
navigation = About, Gallery
default values for all configurations
- unicode support for tags
- work with the
- Feed per tag
- Theme through CSS
- A new blueprint theme adopted from http://www.fireandknowledge.org/archives/2007/09/05/blueprint-wordpress-theme/
- Support for tags, see
- Support for subtitle
- Add a tag folder under