Total Pageviews

Sunday, 14 August 2016

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

cd /usr/local
git clone https://github.com/travisred/blogpy blogpy-site
cd blogpy-site

root@AR:/usr/local/blogpy-site# ls
build.py     md screenshot.png settings.pyc  static
LICENSE.txt  README.md settings.py site

root@AR:/usr/local/blogpy-site# cd site
root@AR:/usr/local/blogpy-site/site# ls
archive css img     
hello index.html  rss.xml
root@AR:/usr/local/blogpy-site/site#
(程序作者事先已替我们生成了静态博客网站的根目录。/usr/local/blogpy-site/site/就是静态博客网站的根目录)
root@AR:/usr/local/blogpy-site/site# cd ..
root@AR:/usr/local/blogpy-site# ls
build.py     md screenshot.png settings.pyc  static
LICENSE.txt  README.md settings.py site
root@AR:/usr/local/blogpy-site# cd md
root@AR:/usr/local/blogpy-site/md# ls
hello   
root@AR:/usr/local/blogpy-site/md# nano test-1
root@AR:/usr/local/blogpy-site/md# cat test-1
测试1
2016-08-14 20:10

这是测试1.
root@AR:/usr/local/blogpy-site/md# cd ..
root@AR:/usr/local/blogpy-site# ls
build.py     md screenshot.png settings.pyc  static
LICENSE.txt  README.md settings.py site
root@AR:/usr/local/blogpy-site# python build.py(这个就是更新静态网站的命令)
root@AR:/usr/local/blogpy-site# 

演示网站:http://bp.smt.biz.st
项目地址:https://github.com/travisred/blogpy
这个博客程序不支持分页。

作者的另一个静态博客程序comanche,http://briteming.blogspot.com/2016/07/phpcomanche.html