Total Pageviews

Friday 20 December 2013

在linux vps上搭建基于python的静态博客程序-volt


pip install volt
git clone https://github.com/bow/volt
cd volt
mkdir volt-test
cd volt-test
volt demo  (不要运行volt init,此命令有bug)
ctrl+c
as3:~/volt/volt-test# ls
contents  site  templates  voltconf.py  voltconf.pyc  widgets.py  widgets.pyc
(这些都是volt demo命令所生成的东西)
as3:~/volt/volt-test# cd site
as3:~/volt/volt-test/site# ls
1998  2002  2012  css  index.html  js  page  robots.txt  tag
as3:~/volt/volt-test/site#
可见~/volt/volt-test/site/就是静态网站的根目录。

发贴方法:
as3:~/volt/volt-test/site# cd ..
as3:~/volt/volt-test# ls
contents  site  templates  voltconf.py  voltconf.pyc  widgets.py  widgets.pyc
as3:~/volt/volt-test# cd contents
as3:~/volt/volt-test/contents# ls
blog  plain
as3:~/volt/volt-test/contents# cd blog
as3:~/volt/volt-test/contents/blog# ls
01_hello-world.md             03_top-cat.md  
02_getting-your-hands-wet.md  04_hong-kong.md
as3:~/volt/volt-test/contents/blog#
按01_hello-world.md的内容格式,新建帖子05_test1.md,格式如下:
---
title: test1
tags: misc
time: 2013/12/20 14:01
---

这是测试1.

as3:~/volt/volt-test/contents/blog# cd ~/volt/volt-test/
as3:~/volt/volt-test# volt gen (这个就是生成/更新静态网站的命令)

演示站点:http://as3.brite.biz:7642/,http://volt.brite.biz
项目地址:https://github.com/bow/volt