Hello!
On Sat, Oct 8, 2016 at 2:35 AM, oo Qiao wrote:
> 比如pintsized/lua-resty-http找到了lua-resty-http-0.09.pod这个文件如何查看它呢?
>
目前查看起来稍微有点儿纠结,这一块需要做更多的一些工作。步骤如下(假设你的 openresty 安装到默认的 prefix,即
/usr/local/openresty/ 下面)。
1. 首先安装最新的 restydoc 命令行工具,这只需要做一次:
cd /tmp/
git clone git://github.com/openresty/resty-cli
cd resty-cli/
cp bin/restydoc /usr/local/openresty/bin/
export PATH=/usr/local/openresty/bin:$PATH
2. 每次查看 opm 安装的模块对应的文档时使用类似下面这的命令:
restydoc -r /usr/local/openresty/site lua-resty-http
当然,后面可以让 restydoc 自动搜索 <openresty-prefix/site 路径下的文档索引,就不用自己显式地通过 -r
选项来指定了。眼下你可以自己在 ~/.bashrc 或者 ~/.bash_profile 文件里定义一个 alias 来简化命令。
希望下一个 OpenResty 发布能包含增强版的 restydoc 以及 opm :)
Regards,
-agentzh