先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack和ghc和hakyll.
cd /usr/local
git clone https://github.com/thunky-monk/hamsterdam hamsterdam.co
cd hamsterdam.co
root@AR:/usr/local/hamsterdam.co#
root@AR:/usr/local/hamsterdam.co# ls
LICENSE about.md executable hamsterdam.cabal js projects
README.md css favicon img posts stack.yaml
root@AR:/usr/local/hamsterdam.co# stack build
会显示:
...
Linking .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/hamsterdam/hamsterdam ...
hamsterdam-0.0.1: copy/register
Installing executable(s) in
/usr/local/hamsterdam.co/.stack-work/install/i386-linux/lts-6.0/7.10.3/bin
Completed 125 action(s).
root@AR:/usr/local/hamsterdam.co# .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/hamsterdam/hamsterdam build (此即生成/更新静态网站的根目录的命令)
root@AR:/usr/local/hamsterdam.co# ls
LICENSE _cache about.md executable hamsterdam.cabal js projects
README.md _site css favicon img posts stack.yaml
(生成了_site目录)
root@AR:/usr/local/hamsterdam.co# cd _site
root@AR:/usr/local/hamsterdam.co/_site# ls
about.html css
android-chrome-144x144.png favicon-16x16.png
android-chrome-192x192.png favicon-194x194.png
android-chrome-36x36.png favicon-32x32.png
android-chrome-48x48.png favicon-96x96.png
android-chrome-72x72.png favicon.ico
android-chrome-96x96.png img
apple-touch-icon-114x114.png index.html
apple-touch-icon-120x120.png js
apple-touch-icon-144x144.png manifest.json
apple-touch-icon-152x152.png mstile-144x144.png
apple-touch-icon-180x180.png mstile-150x150.png
apple-touch-icon-57x57.png mstile-310x150.png
apple-touch-icon-60x60.png mstile-310x310.png
apple-touch-icon-72x72.png mstile-70x70.png
apple-touch-icon-76x76.png posts
apple-touch-icon-precomposed.png projects
apple-touch-icon.png projects.html
archive.html safari-pinned-tab.svg
browserconfig.xml templates
root@AR:/usr/local/hamsterdam.co/_site#
(可见/usr/local/hamsterdam.co/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/hamsterdam.co/_site# cd ..
root@AR:/usr/local/hamsterdam.co# cd posts
root@AR:/usr/local/hamsterdam.co/posts# nano test-1.md
root@AR:/usr/local/hamsterdam.co/posts# cat test-1.md
---
title: 测试1
excerpt: 这是测试1...
date: 2017-01-11 23:05:00
---
这是测试1.
看看如何?
root@AR:/usr/local/hamsterdam.co/posts# cd ..
root@AR:/usr/local/hamsterdam.co# .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/hamsterdam/hamsterdam build
演示网站:http://hd.bright.biz.st, http://hd.bright.biz.st/archive.html(点击首页的右上角的三个黑点,即可看到此链接)
项目地址:https://github.com/thunky-monk/hamsterdam
cd /usr/local
git clone https://github.com/thunky-monk/hamsterdam hamsterdam.co
cd hamsterdam.co
root@AR:/usr/local/hamsterdam.co#
root@AR:/usr/local/hamsterdam.co# ls
LICENSE about.md executable hamsterdam.cabal js projects
README.md css favicon img posts stack.yaml
root@AR:/usr/local/hamsterdam.co# stack build
会显示:
...
Linking .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/hamsterdam/hamsterdam ...
hamsterdam-0.0.1: copy/register
Installing executable(s) in
/usr/local/hamsterdam.co/.stack-work/install/i386-linux/lts-6.0/7.10.3/bin
Completed 125 action(s).
root@AR:/usr/local/hamsterdam.co# .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/hamsterdam/hamsterdam build (此即生成/更新静态网站的根目录的命令)
root@AR:/usr/local/hamsterdam.co# ls
LICENSE _cache about.md executable hamsterdam.cabal js projects
README.md _site css favicon img posts stack.yaml
(生成了_site目录)
root@AR:/usr/local/hamsterdam.co# cd _site
root@AR:/usr/local/hamsterdam.co/_site# ls
about.html css
android-chrome-144x144.png favicon-16x16.png
android-chrome-192x192.png favicon-194x194.png
android-chrome-36x36.png favicon-32x32.png
android-chrome-48x48.png favicon-96x96.png
android-chrome-72x72.png favicon.ico
android-chrome-96x96.png img
apple-touch-icon-114x114.png index.html
apple-touch-icon-120x120.png js
apple-touch-icon-144x144.png manifest.json
apple-touch-icon-152x152.png mstile-144x144.png
apple-touch-icon-180x180.png mstile-150x150.png
apple-touch-icon-57x57.png mstile-310x150.png
apple-touch-icon-60x60.png mstile-310x310.png
apple-touch-icon-72x72.png mstile-70x70.png
apple-touch-icon-76x76.png posts
apple-touch-icon-precomposed.png projects
apple-touch-icon.png projects.html
archive.html safari-pinned-tab.svg
browserconfig.xml templates
root@AR:/usr/local/hamsterdam.co/_site#
(可见/usr/local/hamsterdam.co/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/hamsterdam.co/_site# cd ..
root@AR:/usr/local/hamsterdam.co# cd posts
root@AR:/usr/local/hamsterdam.co/posts# nano test-1.md
root@AR:/usr/local/hamsterdam.co/posts# cat test-1.md
---
title: 测试1
excerpt: 这是测试1...
date: 2017-01-11 23:05:00
---
这是测试1.
看看如何?
root@AR:/usr/local/hamsterdam.co/posts# cd ..
root@AR:/usr/local/hamsterdam.co# .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/hamsterdam/hamsterdam build
演示网站:http://hd.bright.biz.st, http://hd.bright.biz.st/archive.html(点击首页的右上角的三个黑点,即可看到此链接)
项目地址:https://github.com/thunky-monk/hamsterdam
No comments:
Post a Comment