cd /usr/local
git clone https://github.com/ralsina/nicoletta nicoletta-site
cd nicoletta-site
git clone https://github.com/ralsina/nicoletta nicoletta-site
cd nicoletta-site
root@AR:/usr/local/nicoletta-site# ls
conf nicoletta.py posts requirements.txt
Guardfile README.md templates
root@AR:/usr/local/nicoletta-site# pip install -r requirements.txt
root@AR:/usr/local/nicoletta-site# ./nicoletta.py
第一次运行会遇错,提示output目录不存在,解决办法:
root@AR:/usr/local/nicoletta-site# mkdir output
root@AR:/usr/local/nicoletta-site# ./nicoletta.py (此即生成/更新静态网站的根目录的命令)
root@AR:/usr/local/nicoletta-site# ls
conf nicoletta.py posts requirements.txt
Guardfile output README.md templates
root@AR:/usr/local/nicoletta-site# cd output
root@AR:/usr/local/nicoletta-site/output# ls
index.html welcome.html
secondpost.html
root@AR:/usr/local/nicoletta-site/output#
(可见/usr/local/nicoletta-site/output就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/nicoletta-site/output# cd ../posts
root@AR:/usr/local/nicoletta-site/posts# nano test-1.txt
root@AR:/usr/local/nicoletta-site/posts# cat test-1.txt
title: 测试1
date: 2016-11-21
这是测试1.
看看如何?
root@AR:/usr/local/nicoletta-site/posts# cd ..
root@AR:/usr/local/nicoletta-site# ./nicoletta.py
演示网站:http://nl.bright.biz.st,(可惜这个博客程序,在同一天发表的帖子不是按时间顺序排列的。这从date的值就可知,date的值没有提及hh:mm,即没有写成2016-11-21 17:11这种形式,因为该程序暂不支持这种形式。)
项目地址:https://github.com/ralsina/nicoletta
相关帖子:http://briteming.blogspot.com/2013/10/linux-vpspython-nikola.html
nikola是nicoletta的升级版。