Total Pageviews

Wednesday 29 June 2016

一个基于go的静态网站程序-peach


Install from source code requires you have setup Go environment and set $GOPATH variable correctly.
You can check them with following commands:
$ go version
go version go1.5.1 darwin/amd64
$ echo $GOPATH
~unknwon/go
The minimum requirement version of Go is 1.3.
You can then install Peach by executing following command:
go get github.com/peachdocs/peach
Add -u flag to update Peach:
go get -u github.com/peachdocs/peach
You can then use following command to check which version of Peach is installed on your system (Suppose $GOPATH/bin has been added to your $PATH):
$ peach -vcd /usr/local/mkdir peach-sitecd peach-sitepeach new回答问题。在这一步Do you want to use custom templates?[Y/n] ,回答n.在当前目录下,会生成my.peach目录:
root@AR:/usr/local/peach-site# ls
my.peach
root@AR:/usr/local/peach-site# cd my.peach
root@AR:/usr/local/peach-site/my.peach# ls
public  templates
root@AR:/usr/local/peach-site/my.peach# git clone https://github.com/peachdocs/peach.peach custom
from https://peachdocs.org/docs/intro/installationhttps://peachdocs.org/docs/intro/getting_started项目地址:https://github.com/peachdocs/peach

Developing Locally

To make your life easier while you’re developing your documentation locally, Peach also supports specify a local target path of your documentation repository:(编辑custom/app.ini文件)
RUN_MODE = dev

[docs]
TYPE = local
TARGET = /usr/local/peach-site/my.peach/data/docs/
In dev mode, Peach reloads your documents every time you refresh a page, so you can preview results instantly.
然后在/usr/local/peach-site/my.peach/目录,运行nohup peach web > /dev/null &
然后访问http://your_vps_ip:5556,即可看到网站效果。
from https://peachdocs.org/docs/howto/documentation
演示站点:http://surmount.biz.st:5556/docs,http://surmount.biz.st:5556/