Total Pageviews

Friday 27 January 2017

搭建基于haskell的静态博客程序kongo2002-blog

先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.

cd /usr/local
git clone https://github.com/kongo2002/blog uhlenheuer.net
cd uhlenheuer.net

root@AR:/usr/local/uhlenheuer.net# ls
Makefile  about.markdown  posts   static
css          projects.markdown  site.hs  templates
images     
root@AR:/usr/local/uhlenheuer.net#  ghc --make site.hs
root@AR:/usr/local/uhlenheuer.net# ./site build
root@AR:/usr/local/uhlenheuer.net# cd _site
root@AR:/usr/local/uhlenheuer.net/_site# ls
about.html  feed.atom  index.html  posts.html      static  tags.html
css        images     posts       projects.html  tags
root@AR:/usr/local/uhlenheuer.net/_site#
(可见/usr/local/uhlenheuer.net/_site就是静态网站的根目录)

新建源帖:
root@AR:/usr/local/uhlenheuer.net/_site# cd ../posts
root@AR:/usr/local/uhlenheuer.net/posts# nano 2017-01-27-test-1.markdown
root@AR:/usr/local/uhlenheuer.net/posts# cat 2017-01-27-test-1.markdown
---
tags: misc1, misc2, misc3
author: brite fisherman
title: 测试1
summary: 这是测试。。。
---

这是测试1.

看看如何?

root@AR:/usr/local/uhlenheuer.net/posts# cd ..
root@AR:/usr/local/uhlenheuer.net# ./site rebuild

演示网站:http://ulh.bright.biz.st
项目地址:https://github.com/kongo2002/blog

No comments:

Post a Comment