git clone https://github.com/taylorchu/baker
cd baker
as3:~/baker# ls
baker.sh content layouts LICENSE.txt pages public snippets
config.sh includes lib posts README.md vars
as3:~/baker# ./baker.sh -h
baker
post [title] create new post
page [title] create new post
bake [--force] ship static page
video [file] create video markdown
audio [file] create audio markdown
as3:~/baker# ./baker.sh bake (这个就是生成/更新静态网站的命令)
as3:~/baker# ls
baker.sh content layouts LICENSE.txt pages public snippets
config.sh includes lib out posts README.md vars
(新出现了out目录)
as3:~/baker# cd out
as3:~/baker/out# ls
2013-11-08-hello-world.html about-me.html favicon.png masonry
baker.html images misc.html
bootstrap index.html rss.xml
content jwplayer
(可见~/baker/out/就是静态网站的根目录)
as3:~/baker/out# nohup Rwebserver 48913 > /dev/null &
访问http://as3.brite.biz:48913即可看到网站效果。
发贴方法:
as3:~/baker/out# cd ~/baker/posts/
as3:~/baker/posts# ls
2013-11-08-hello-world.md
as3:~/baker/posts# nano 2014-04-04-test3.md
按2013-11-08-hello-world.md的格式,新建帖子2014-04-04-test3.md,格式如下:
---
title: 测试3
date: 2014-04-04 1:15
tags: misc
layout: post
---
这是测试3.
然后,
as3:~/baker/posts# cd ..
as3:~/baker# ./baker.sh bake
演示站点:http://as3.brite.biz:48913,http://bk.briteming.fm.pe/
项目地址:https://github.com/taylorchu/baker
如果要插入音频/视频代码,则这样做:新建帖子2014-04-04-mothers-kiss.md,格式如下:
---
title: 妈妈的吻
date: 2014-04-04 1:18
tags: misc
layout: post
---
[iframe 400x60](http://tilidom.com/dewplayer/dewplayer.swf?id=28264&token=BC060DAE9&mp3=http://tilidom.com/tilidom/download/tiliplayer?file_id=758427&autoreplay=1)
上述( ) 里面为播放器页面的网址,比如youtube的这种网址:
https://www.youtube.com/v/JLl0Sch2t0U
cd baker
as3:~/baker# ls
baker.sh content layouts LICENSE.txt pages public snippets
config.sh includes lib posts README.md vars
as3:~/baker# ./baker.sh -h
baker
post [title] create new post
page [title] create new post
bake [--force] ship static page
video [file] create video markdown
audio [file] create audio markdown
as3:~/baker# ./baker.sh bake (这个就是生成/更新静态网站的命令)
as3:~/baker# ls
baker.sh content layouts LICENSE.txt pages public snippets
config.sh includes lib out posts README.md vars
(新出现了out目录)
as3:~/baker# cd out
as3:~/baker/out# ls
2013-11-08-hello-world.html about-me.html favicon.png masonry
baker.html images misc.html
bootstrap index.html rss.xml
content jwplayer
(可见~/baker/out/就是静态网站的根目录)
as3:~/baker/out# nohup Rwebserver 48913 > /dev/null &
访问http://as3.brite.biz:48913即可看到网站效果。
发贴方法:
as3:~/baker/out# cd ~/baker/posts/
as3:~/baker/posts# ls
2013-11-08-hello-world.md
as3:~/baker/posts# nano 2014-04-04-test3.md
按2013-11-08-hello-world.md的格式,新建帖子2014-04-04-test3.md,格式如下:
---
title: 测试3
date: 2014-04-04 1:15
tags: misc
layout: post
---
这是测试3.
然后,
as3:~/baker/posts# cd ..
as3:~/baker# ./baker.sh bake
演示站点:http://as3.brite.biz:48913,http://bk.briteming.fm.pe/
项目地址:https://github.com/taylorchu/baker
如果要插入音频/视频代码,则这样做:新建帖子2014-04-04-mothers-kiss.md,格式如下:
---
title: 妈妈的吻
date: 2014-04-04 1:18
tags: misc
layout: post
---
[iframe 400x60](http://tilidom.com/dewplayer/dewplayer.swf?id=28264&token=BC060DAE9&mp3=http://tilidom.com/tilidom/download/tiliplayer?file_id=758427&autoreplay=1)
上述( ) 里面为播放器页面的网址,比如youtube的这种网址:
https://www.youtube.com/v/JLl0Sch2t0U