项目作者: asbamboo

项目描述 :
asbamboo相关代码相关文档
高级语言: HTML
项目地址: git://github.com/asbamboo/docs.git
创建时间: 2018-06-12T12:33:36Z
项目社区:https://github.com/asbamboo/docs

开源协议:BSD 3-Clause "New" or "Revised" License

下载


文档生成

pip install Sphinx

pip install jieba

sphinx-quickstart

conf.py 添加如下配置

  1. # Language to be used for generating the HTML full-text search index.
  2. # Sphinx supports the following languages:
  3. # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
  4. # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
  5. html_search_language = 'zh'
  6. # A dictionary with options for the search language support, empty by default.
  7. # 'ja' uses this config value.
  8. # 'zh' user can custom change `jieba` dictionary path.
  9. html_search_options = {'dict': os.getcwd() + 'dict.txt'} # 根据需要设置jieba的词典路径

sphinx-build -b html . _build

服务器运行

docker build -t asbamboo/docs .

docker run -d -v /www/docs/_build:/srv/asbamboo/docs/web -p80:80 —name=asbamboo_docs asbamboo/docs

通过浏览器 访问http://127.0.0.1