先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.
stack install cabal-install
cd /usr/local
git clone https://github.com/treeman/jonashietala jonashietala.se
cd jonashietala.se
stack install cabal-install
cd /usr/local
git clone https://github.com/treeman/jonashietala jonashietala.se
cd jonashietala.se
root@AR:/usr/local/jonashietala.se# ls
README.markdown blog files rebuild.sh
css images static
drafts posts sync
about.markdown edit.pl projects site.hs templates
root@AR:/usr/local/jonashietala.se# ghc --make site.hs
(第一次,运行此命令会遇错)
解决办法:
root@AR:/usr/local/jonashietala.se# cabal install missingh
root@AR:/usr/local/jonashietala.se# ghc --make site.hs (再运行此命令就不会遇错了。)
root@AR:/usr/local/jonashietala.se# ./site build
root@AR:/usr/local/jonashietala.se# cd _site
root@AR:/usr/local/jonashietala.se/_site# ls
404 blog css index.html projects
404.txt blog.txt drafts index.txt projects.txt
archive contact feed.xml masters_thesis recommendations
archive.txt contact.txt images masters_thesis.txt recommendations.txt
root@AR:/usr/local/jonashietala.se/_site#
(可见/usr/local/jonashietala.se/_site是静态网站的根目录)
新建源帖:
root@AR:/usr/local/jonashietala.se/_site# cd ../posts
root@AR:/usr/local/jonashietala.se/posts# nano 2017-02-06-test-1.markdown
root@AR:/usr/local/jonashietala.se/posts# cat 2017-02-06-test-1.markdown
---
layout: post
title: 测试1
tags: misc1, misc2, misc3
---
这是测试1.
看看如何?
root@AR:/usr/local/jonashietala.se/posts# cd ..
root@AR:/usr/local/jonashietala.se# ./site rebuild
演示网站:http://js.bright.biz.st
项目地址:https://github.com/treeman/jonashietala
https://github.com/jgoerzen/missingh
https://hackage.haskell.org/package/MissingH
No comments:
Post a Comment