cd /usr/local
git clone https://github.com/oisdk/site doisinkidney.com
cd doisinkidney.com
root@AR:/usr/local/doisinkidney.com# stack build
会显示:
...
Linking .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/site/site ...
...
root@AR:/usr/local/doisinkidney.com# .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/site/site build
root@AR:/usr/local/doisinkidney.com# ls
CNAME _site contact.markdown images site.cabal templates
README.md about.markdown css index.html src test
_cache assets drafts posts stack.yaml
root@AR:/usr/local/doisinkidney.com# cd _site
root@AR:/usr/local/doisinkidney.com/_site# ls
CNAME contact.html images posts series
about.html css index.html rss.xml tags
root@AR:/usr/local/doisinkidney.com/_site#
( 可见/usr/local/doisinkidney.com/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/doisinkidney.com/_site# cd ../posts
root@AR:/usr/local/doisinkidney.com/posts# nano 2017-02-13-test-1.markdown
root@AR:/usr/local/doisinkidney.com/posts# cat 2017-02-13-test-1.markdown
---
title: 测试1
tags: misc1, misc2, misc3
---
这是测试1.
看看如何?
root@AR:/usr/local/doisinkidney.com/posts# cd ..
root@AR:/usr/local/doisinkidney.com# .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/site/site rebuild
演示网站:http://dik.bright.biz.st/
项目地址:https://github.com/oisdk/site
No comments:
Post a Comment