先按此文http://briteming.blogspot.com/2014/02/linux-vpserlang.html 安装erlang.
apt install realpath -y (我的系统是debian/ubuntu.如果是centos/fedora系统,则
yum install realpath -y)
cd /usr/local
git clone https://github.com/gar1t/lambdapad lambdapad-site
cd lambdapad-site
root@localhost:/usr/local/lambdapad-site# ls
bin docs erlang.mk LPAD2.md README.md src
deps ebin LICENSE Makefile samples TODO.md
root@localhost:/usr/local/lambdapad-site# make
root@localhost:/usr/local/lambdapad-site# cd samples
root@localhost:/usr/local/lambdapad-site/samples# ls
assets hello hello_json index.erl
blog hello_eterm hello_markdown Makefile
root@localhost:/usr/local/lambdapad-site/samples# make
root@localhost:/usr/local/lambdapad-site/samples# cd blog
root@localhost:/usr/local/lambdapad-site/samples/blog# ls
assets index.erl posts templates
blog.config Makefile snippets
root@localhost:/usr/local/lambdapad-site/samples/blog# make (此即生成/更新静态网站的根目录的命令。其实在此,相当于运行../../bin/lpad-gen )
root@localhost:/usr/local/lambdapad-site/samples/blog# ls
assets index.erl posts templates
blog.config Makefile site snippets
(生成了site目录)
root@localhost:/usr/local/lambdapad-site/samples/blog# cd site
root@localhost:/usr/local/lambdapad-site/samples/blog/site# ls
assets examples index.html posts
root@localhost:/usr/local/lambdapad-site/samples/blog/site#
(可见/usr/local/lambdapad-site/samples/blog/site就是静态网站的根目录)
新建源帖:
root@localhost:/usr/local/lambdapad-site/samples/blog/site# cd ../posts
root@localhost:/usr/local/lambdapad-site/samples/blog/posts# nano test-1.md
root@localhost:/usr/local/lambdapad-site/samples/blog/posts# cat test-1.md
id : test-1
title : 测试1
date : 2017-04-03 18:40:00
author : brite fisherman
blurb : 点击标题,看全文
这是测试1.
看看如何?
root@localhost:/usr/local/lambdapad-site/samples/blog/posts# cd ..
root@localhost:/usr/local/lambdapad-site/samples/blog# make
../../bin/lpad-gen
root@localhost:/usr/local/lambdapad-site/samples/blog#
演示网站:http://ldp.bright.biz.st/, http://ldp.bright.biz.st/posts
项目地址:https://github.com/gar1t/lambdapad
https://github.com/gar1t/lambdapad/issues/21
No comments:
Post a Comment