git clone https://github.com/isnowfy/markblog
cd markblog
pip install -r requirements.txt
as3:~/markblog# ls
config.json main.py post.json README requirements.txt templates
(编辑config.json,可修改每页所显示帖子的数目)
as3:~/markblog# python main.py
valid args:
arghelp --> arguments help
update --> generate the static html
server --> preview the html
init --> initialize the blog folder
post --> create new post
page --> create new page
as3:~/markblog# python main.py init (此命令会在当前目录下,生成blog目录)
as3:~/markblog# ls
blog config.json main.py post.json README requirements.txt templates
as3:~/markblog# python main.py post test1 (这个是新建源帖的命令.这里的test1为post slug,建议用英文)
as3:~/markblog# ls
blog config.json main.py post.json README requirements.txt templates
as3:~/markblog# ls blog
atom.xml config.json css js search.json src
(生成了src目录)
as3:~/markblog# cd blog/src
as3:~/markblog/blog/src# ls
post
as3:~/markblog/blog/src# cd post
as3:~/markblog/blog/src/post# ls
test1
as3:~/markblog/blog/src/post# cd test1
as3:~/markblog/blog/src/post/test1# ls
post.json post.md
as3:~/markblog/blog/src/post/test1# nano post.md
格式为:
## 测试1 (注意:此行的“测试1”可不写。)
这是测试1.
as3:~/markblog/blog/src/post/test1# nano post.json
格式为:
{
"title": "测试1",
"author": "ym",
"date": "2014-05-05 15:10",
"tags": "split with space"
}
(至此,源帖创建完成)
as3:~/markblog/blog/src/post/test1# cd ~/markblog/
as3:~/markblog# python main.py update (此命令就是生成/更新静态网站的命令)
as3:~/markblog# cd blog
as3:~/markblog/blog# ls
atom.xml config.json css index.html js search.json src tag test1
(出现了index.html文件,可见此时的~/markblog/blog/就是静态网站的根目录)
as3:~/markblog/blog# nohup Rwebserver 34284 > /dev/null &
访问http://as3.brite.biz:34284/即可看到网站效果。
DEMO SITE: http://mb.surmount.biz.wf/
项目地址 https://github.com/isnowfy/markblog
cd markblog
pip install -r requirements.txt
as3:~/markblog# ls
config.json main.py post.json README requirements.txt templates
(编辑config.json,可修改每页所显示帖子的数目)
as3:~/markblog# python main.py
valid args:
arghelp --> arguments help
update --> generate the static html
server --> preview the html
init --> initialize the blog folder
post --> create new post
page --> create new page
as3:~/markblog# python main.py init (此命令会在当前目录下,生成blog目录)
as3:~/markblog# ls
blog config.json main.py post.json README requirements.txt templates
as3:~/markblog# python main.py post test1 (这个是新建源帖的命令.这里的test1为post slug,建议用英文)
as3:~/markblog# ls
blog config.json main.py post.json README requirements.txt templates
as3:~/markblog# ls blog
atom.xml config.json css js search.json src
(生成了src目录)
as3:~/markblog# cd blog/src
as3:~/markblog/blog/src# ls
post
as3:~/markblog/blog/src# cd post
as3:~/markblog/blog/src/post# ls
test1
as3:~/markblog/blog/src/post# cd test1
as3:~/markblog/blog/src/post/test1# ls
post.json post.md
as3:~/markblog/blog/src/post/test1# nano post.md
格式为:
## 测试1 (注意:此行的“测试1”可不写。)
这是测试1.
as3:~/markblog/blog/src/post/test1# nano post.json
格式为:
{
"title": "测试1",
"author": "ym",
"date": "2014-05-05 15:10",
"tags": "split with space"
}
(至此,源帖创建完成)
as3:~/markblog/blog/src/post/test1# cd ~/markblog/
as3:~/markblog# python main.py update (此命令就是生成/更新静态网站的命令)
as3:~/markblog# cd blog
as3:~/markblog/blog# ls
atom.xml config.json css index.html js search.json src tag test1
(出现了index.html文件,可见此时的~/markblog/blog/就是静态网站的根目录)
as3:~/markblog/blog# nohup Rwebserver 34284 > /dev/null &
访问http://as3.brite.biz:34284/即可看到网站效果。
DEMO SITE: http://mb.surmount.biz.wf/
项目地址 https://github.com/isnowfy/markblog