new version of CakePHP docs
CSS Python JavaScript PHP
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 7 commits ahead, 5569 commits behind cakephp:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


CakePHP 文档

本文档是打算替代现有的cookbook. Hopefully enabling community contributions and enabling multiple format documentation generation.


你可以以纯文本文件的方式阅读全部文档, 或者带ReST格式阅读. 要构建文档你需要以下的依赖:

  • Make
  • Python
  • Sphinx
  • PhpDomain for sphinx


easy_install sphinx


easy_install sphinxcontrib-phpdomain

要使用easy_install命令, setuptools包需要已经安装并可用.


After installing the required packages, you can build the documentation using Make.

# 构建包含全部语言HTML版文档.
make html

# 构建英文的HTML版文档.
make html-en

# 构建包含全部语言的EPUB (e-book)版文档.
make epub

# 仅构建英文的EPUB文档.
make epub-en

# 填充搜索索引
make populate-index

This will generate all the documentation in an html form. Other output such as 'pdf' and 'htmlhelp' are not fully complete at this time.

After making changes to the documentation, you can build the html version of the docs by using make html again. This will build only the html files that have had changes made to them.


Contributing to the documentation is pretty simple. Please read the documentation on contributing to the documentation over on the cookbook for help.

There are currently a number of outstanding issues that need to be addressed. We've tried to flag these with .. todo:: where possible. To see all the outstanding todo's add the following to your config/

todo_include_todos = True

After rebuilding the html content, you should see a list of existing todo items at the bottom of the table of contents.

You are also welcome to make and suggestions for new content as commits in a github fork. Please make any totally new sections in a separate branch. This makes changes far easier to integrate later on.


Contributing translations requires that you make a new directory using the two letter name for your language. As content is translated, directories mirroring the english content should be created with localized content.


If you are providing translations and want to automatically generate meta tags for the resulting html files, a MetatagShell is provided in the scripts folder of this repo. In order to use it, copy it into any CakePHP 2.0 empty application inside app/Console/Command, execute Console/cake metatag and follow the instructions.

The script will process all the files under one of the translation folders and generate the possible description terms using an external API, it is a good idea to go over the generated terms and clean-up whatever noise it might have generated.

Making search work locally

  • Install elasticesearch. This varies based on your platform, but most package managers have a package for it.
  • Clone the docs_search into a web accessible directory directory.
  • Modify searchUrl in themes/cakephp/static/app.js to point at the baseurl for your docs_search clone.
  • Start elasticsearch with the default configuration.
  • Populate the search index using make populate-index.
  • You should now be able to search the docs using elasticsearch.