Pages

Monday, 1 August 2016

基于nodejs的静态博客程序node-deadsimplelog

登陆linux Vps,搭建node环境。
cd /usr/local/
git clone https://github.com/tallesl/node-deadsimplelog  node-deadsimplelog-site
cd node-deadsimplelog-site
npm install -g deadsimplelog
root@AR:/usr/local/node-deadsimplelog-site# ls
asset index.js  package.json
lib       LICENSE README.md
root@AR:/usr/local/node-deadsimplelog-site# deadsimplelog (这个就是生成/更新静态网站的命令)
root@AR:/usr/local/node-deadsimplelog-site# ls
asset index.js  package.json html
lib       LICENSE README.md
(生成了html目录)
root@AR:/usr/local/node-deadsimplelog-site# cd html
root@AR:/usr/local/node-deadsimplelog-site/html# ls
index.html  LICENSE style.css
asset index.js package.json
lib   readme.html

root@AR:/usr/local/node-deadsimplelog-site/html# 
(/usr/local/node-deadsimplelog-site/html/里面有index.html文件,可见/usr/local/node-deadsimplelog-site/html/就是静态网站的根目录)

新建源贴:
root@AR:/usr/local/node-deadsimplelog-site/html# cd ..
root@AR:/usr/local/node-deadsimplelog-site# nano test-1.md
(按README.md文件的格式,新建test-1.md,如下:
# 测试1

这是测试1.)
root@AR:/usr/local/node-deadsimplelog-site# deadsimplelog

演示站点:http://dsl.smt.biz.st
项目地址:https://github.com/tallesl/node-deadsimplelog
好像不能分页。新建的源贴的文件名不能用中文。