Total Pageviews

Wednesday, 6 July 2016

一个基于python的静态博客程序-genie

Genie is a static blog generator written in python. It is inspired by many projects like PelicanSimple and Rux. It is probably the simplest static blog generator you'll ever seen.


Features

  • Generate static html from Markdown
  • No tags, No categories, No RSS feed, No comments...
  • Extremely simple configuration(only one json file)
  • Really easy to use(only one python file)
  • Github Flavored Markdown(GFM) supported(using Mistune)
  • Syntax highlighting supported(using highlight.js)

Requirements

  • mistune (pip install mistune)

Installation

Just clone this repo to wherever you like
$ git clone git@github.com:skyline75489/Genie.git

Usage

Choose your own blog name, input and output path in genie.settings .
My settings is like this:
{
    "in_file_path":"input/",
    "out_file_path":"output/",
    "blog_name":"Skyline75489"
}
Write some posts in Markdown and save them as xxx.md in the input path. It will generate into xxx.html in the output path. The first line of the file will be the title of the post. So you should write something like this:
This is the title
=================

And this is what I want to say...

Right! Just like writing README.md.
When you finished your writing, run
$ python genie.py
If everything goes fine, then well done! You have a new blog site now. It's really easy, isn't it?
If you want to see what it looks like, you can do this:
$ cd your-dst-path
$ python -m SimpleHTTPServer

Customize your site!

The templates and the CSS files is quite simple too. You can change them to anything you like!
from https://github.com/skyline75489/Genie

演示站点:http://surmount.biz.st:3424,(我用Rwebserver监听3424端口)
http://gn.smt.biz.st:81(81端口运行的webserver是apache2)