Trước tiên, giữ hai cây thư mục, source
và build
. Đặt source
trong điều khiển phiên bản. Không đặt build
trong điều khiển phiên bản, xây dựng lại nó như một phần của quá trình cài đặt.
Thứ hai, đọc http://sphinx.pocoo.org/intro.html#setting-up-the-documentation-sources.
Sử dụng sphinx-quickstart
để tạo cây tài liệu thực hành. Chơi với điều này trong một vài ngày để tìm hiểu cách nó hoạt động. Sau đó sử dụng nó một lần nữa để xây dựng điều thực sự trong các thư mục SVN.
Sắp xếp tài liệu của bạn trong một cây được lên kế hoạch tốt. Một số phần cần "index.rst" cho phần đó, một số thì không. Nó phụ thuộc vào cách "độc lập" phần là.
Cấp cao nhất của chúng tôi index.rst
giống như thế này.
.. XXX documentation master file, created by sphinx-quickstart on Wed Dec 31 07:27:45 2008.
.. include:: overview.inc
.. _`requirements`:
Requirements
============
.. toctree::
:maxdepth: 1
requirements/requirements
requirements/admin
requirements/forward
requirements/volume
.. _`architecture`:
Architecture
============
.. toctree::
:maxdepth: 1
architecture/architecture
architecture/techstack
architecture/webservice_tech
architecture/webservice_arch
architecture/common_features
architecture/linux_host_architecture
Detailed Designs
================
.. toctree::
:maxdepth: 3
design/index
Installation and Operations
===========================
.. toctree::
:maxdepth: 1
deployment/installation
deployment/operations
deployment/support
deployment/load_test_results
deployment/reference
deployment/licensing
Programming and API's
=====================
.. toctree::
:maxdepth: 2
programming/index
**API Reference**. The `API Reference`_ is generated from the source.
.. _`API Reference`: ../../../apidoc/xxx/index.html
.. note::
The API reference must be built with `Epydoc`_.
.. _`Epydoc`: http://epydoc.sourceforge.net/
Management
==========
.. toctree::
:maxdepth: 2
:glob:
management/*
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
SVN Revision
============
::
$Revision: 319 $
Lưu ý, chúng tôi không "bao gồm" API, chúng tôi chỉ tham chiếu nó bằng liên kết HTML thông thường.
Nhân sư có một tiện ích rất thú vị, được gọi là automodule, sẽ chọn các tài liệu từ các mô-đun Python.
Cập nhật Vì nhân sư 1.0, C và C++ được hỗ trợ. http://sphinx.pocoo.org/
Nguồn
2009-05-07 15:01:29
Bạn đã sử dụng Sphinx cho dự án C++ của mình chưa? Nếu vậy thì kinh nghiệm của bạn thế nào? – AndyL