sphinx生成cakephp文档

cakephp的文档是用一个叫sphinx程序生成的 这个程序是python写的,所以我们要用sphinx本机必须先装python。

编译过程在Ubuntu下进行,默认Ubuntu已经安装了python, 命令行下依次执行

sudo apt-get install python-setuptools
sudo apt-get install easy_install
easy_install sphinx
easy_install sphinxcontrib-phpdomain

最后把cakephp的官方文档下载到本地.

git --clone https://github.com/cakephp/docs.git
#根目录执行
cd docs 
make html 
#或者使用下面的命令,只编译en目录,就是英文的HTML文档,
make html-en

编译完成后最终根目录下多出个build目录,打开html/en/index.html。

页面和官网一模一样!http://book.cakephp.org/2.0/en/index.html

 

执行make实际运行的是Makefile文件,在windows下是make.bat批处理, 不过遗憾的是cakephp官方人员并没有提供bat文件。

关于这个问题,我壮着胆子还专门发邮件问了cakephp的作者Mark Story,没想到过了两天给我回信了,内容贴给大家看:

Unfortunately I've never tried to build the docs under windows. There is some support from sphinx (the tool we use to build the docs) for windows. But the additional customizations we've done to make it easy to build all the languages etc were never ported to windows as most people working on the docs don't use windows.

-Mark

On 2013-07-04, at 12:09 AM, Finley Fei Ma
wrote:

> Hi, Mark,
> I am a CakePHP fan also a PHP developer from China, recently I am studying the CakePHP doc, I meet a problem, I don’t know how to build the document under the Windows operating system, there is a Makefile,  looks like it only can run under Linux. So must I install  a Linux operating system?
>  
> Regards,
> Finley

转载于:https://www.cnblogs.com/mafeifan/p/3259945.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值