zoukankan      html  css  js  c++  java
  • 使用sphinx来创建文档

    tag2txt 只生成单个html文档,比较合适写一些api或接口的文档,如果做大项目文档还是想使用sphinx

    安装(需要安装python和easy_install)

    easy_install sphinx

    生成一个项目(按向导进行)

    sphinx-quickstart

    生成的文件&目录

    -rw-r--r--  1 bluefrog bluefrog 7670 2012-05-28 16:32 conf.py
    -rw-r--r--  1 bluefrog bluefrog  417 2012-05-28 16:32 index.rst
    -rw-r--r--  1 bluefrog bluefrog 5092 2012-05-28 16:32 make.bat
    -rw-r--r--  1 bluefrog bluefrog 5556 2012-05-28 16:32 Makefile
    drwxr-xr-x  2 bluefrog bluefrog 4096 2012-05-28 16:32 _static/
    drwxr-xr-x  2 bluefrog bluefrog 4096 2012-05-28 16:32 _templates/

    编辑index.rst文件

    .. test documentation master file, created by
       sphinx-quickstart on Mon May 28 16:32:00 2012.
       You can adapt this file completely to your liking, but it should at least
       contain the root `toctree` directive.
    
    Welcome to test's documentation!
    ================================
    
    Contents:
    
    .. toctree::
       :maxdepth: 2
    
    
    
    Indices and tables
    ==================
    
    * :ref:`genindex`
    * :ref:`modindex`
    * :ref:`search`

    编译文档

    mkdir doc
    sphinx-build . doc

    改天有空可以写一个简单的语法教程

    注:python的文档就是使用sphinx来生成的

    公司大牛有用php写了一个doczen http://www.ec-os.net/doczen.html 个人还是使用sphinx吧

    使用 doczen 生成的示例:

    http://wiki.zx.shopex.cn/

    http://ec-os.net/doc.html

    http://doc.ec-ae.com/

  • 相关阅读:
    Array 对象-sort()
    vue安装
    前端面试题
    JavaScript对象原型
    CSS如何水平垂直居中?
    块格式化上下文(Block Formatting Context,BFC)
    盒子模型
    前端基础
    Markdown语法
    浏览器 滚动条 占据 y轴宽度的解决方案
  • 原文地址:https://www.cnblogs.com/bluefrog/p/2521557.html
Copyright © 2011-2022 走看看