Total Pageviews

Thursday 13 October 2016

搭建基于python的静态博客程序-blo


git clone https://github.com/savuir/blo
cd blo
pip install -r requirements.txt
python setup.py install
(这样,程序就安装好了。不要用pip install blo来安装,这样安装出来的blo的版本太低)

cd /usr/local
blo create blo-site (在当前目录下,会生成blo-site目录)
cd blo-site
blo post hello-world (这个是生成源帖的命令)
cd _blog/pages

root@AR:/usr/local/blo-site/_blog/pages# ls
2016-09-27__hello-world.md  
(上面的blo post hello-world命令会在/usr/local/blo-site/_blog/pages/里生成
2016-09-27__hello-world.md 文件)

root@AR:/usr/local/blo-site/_blog/pages# nano 2016-09-27__hello-world.md 
root@AR:/usr/local/blo-site/_blog/pages# cat 2016-09-27__hello-world.md 
title: 测试1
briefing: click on the title to read full article.
date_time: 2016-09-27 23:50
slug: hello-world
tags: misc
type: post

这是测试1.
root@AR:/usr/local/blo-site/_blog/pages# cd /usr/local/blo-site
root@AR:/usr/local/blo-site# blo build (这个就是生成/更新静态网站的命令)
root@AR:/usr/local/blo-site# 
root@AR:/usr/local/blo-site# ls
2016-09-27  2016-10-11 _blog     rss.xml  tags.html
2016-09-28  2016-10-12 index.html  tag
root@AR:/usr/local/blo-site#
(可见/usr/local/blo-site/就是静态网站的根目录。)

演示网站:http://blo.bright.biz.st/
项目地址:https://github.com/savuir/blo
这个程序好像不能分页。