首先编译python3,
pip3 install blogit
cd /usr/local
mkdir blogit-site
cd blogit-site
blogit --quick-start (此命令会在当前目录下,生成博客目录结构)
blogit --build (此即为生成静态网站的命令)
pip3 install blogit
cd /usr/local
mkdir blogit-site
cd blogit-site
blogit --quick-start (此命令会在当前目录下,生成博客目录结构)
blogit --build (此即为生成静态网站的命令)
root@AR:/usr/local/blogit-site# ls
about.html atom.xml content media README.md templates
archive conf.py index.html __pycache__ tags writings
root@AR:/usr/local/blogit-site#
(blogit --build命令在/usr/local/blogit-site/里生成了index.html, 可见/usr/local/blogit-site/就是静态网站的根目录)
新建源贴:
root@AR:/usr/local/blogit-site# cd content/posts
root@AR:/usr/local/blogit-site/content/posts# nano 2016-10-22-test-1.md
root@AR:/usr/local/blogit-site/content/posts# cat 2016-10-22-test-1.md
---
title: 测试1
published: 2016-10-22
tags: misc1, misc2, misc3
kind: writing
public: true
author: brite fisher
---
这是测试1.
root@AR:/usr/local/blogit-site/content/posts# cd ../..
root@AR:/usr/local/blogit-site# blogit --build
演示网站:http://bi.bright.biz.st
项目地址:https://github.com/oz123/blogit
注意:建立一个源贴后,不要重命名。否则运行blogit --build会遇错。