Total Pageviews

Monday, 13 January 2014

在linux vps上搭建基于python的静态博客程序-bucket3(这个程序不错)

pip install bucket3
mkdir bucket3-site
cd bucket3-site
bucket3 init (此命令会在bucket3-site目录里初始化博客目录结构)
nano .bucket3/conf.yaml (把里面的博客网址http://www.example.com/myblog/改为你自己的域名网址,我的为http://bc3.brite.biz/)

as3:~/bucket3-site# ls
html  log  mentions  posts  static
(~/bucket3-site/里面还有一个隐身的.bucket3目录)
as3:~/bucket3-site# cd posts
as3:~/bucket3-site/posts# bucket3 new test2 (这就是新建帖子的命令)
Created 140113-test2/140113-test2.md.
as3:~/bucket3-site/posts# nano 140113-test2/140113-test2.md
as3:~/bucket3-site/posts# cat 140113-test2/140113-test2.md
---
title: >
 测试2(须空一格才写标题)
date: 2014-01-13 10:20:36
slug: test2
tags: tag1, tag2, tag3
attached:
abstract: 点击标题看全文
---

这是测试2.

然后,
as3:~/bucket3-site/posts# cd ..
as3:~/bucket3-site# bucket3 update (这个就是更新静态网站的命令)
as3:~/bucket3-site# ls
html  log  mentions  posts  static
as3:~/bucket3-site# cd html
as3:~/bucket3-site/html# ls
_  2014  404.html  archive  index.html  robots.txt  rss.xml  sitemap.xml  tag
as3:~/bucket3-site/html#
可见~/bucket3-site/html/就是静态网站的根目录。

演示站点:
http://as3.brite.biz:23985/,http://bc3.brite.biz/
http://bucket3.com/,http://blog.vrypan.net/
项目地址:https://github.com/vrypan/bucket3