sphinx使用及其简单配置_第1页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、sphinx使用及其简单配置一、sphinx用法进入你要创建文档的名目,例如要创建在名目/home/wwwroot/doc下cd /home/wwwroot/doc开头用法向导创建你的文档项目sphinx-quickstart程序会提醒输入一些选项,如输入根名目,大部分用法默认选项,挺直按回车即可。enter the root path for documentation.> root path for the documentation .:/输入跟名目,挺直回车you have two options for placing the build directory for sphin

2、x output.either, you use a directory "_build" within the root path, or you separate"source" and "build" directories within the root path.> separate source and build directories (y/n) n:/是否分别source和build名目,建议选y,便利管理inside the root directory, tw

3、o more directories will be created; "_templates"for custom html templates and "_static" for custom stylesheets and other staticfiles. you can enter another prefix (such as ".") to replace the underscore.> name prefix for templates and static d

4、ir _:/挺直回车the project name will occur in several places in the built documentation.> project name: f2e cookbook> author name(s): imbingdian/输入项目名称/输入作者名称the file name suffix for source files. commonly, this is either ".txt"or ".rst". only files with this suf

5、fix are considered documents.> source file suffix .rst: .txt/档文件的扩展名,默认是.rst/后面的操作基本回车就好完成后可以看到doc文件中生了以下名目文件build-生成文档名目source-源文件名目make.bat makefile生成html文档make html看一下build名目下是不是生成了html文档了?_ enjoy it!二、sphinx容易配置source名目下的conf.py文件为sphinx的配置文件。1)修改文档语言为中文:找到language = none,修改为:language ='z

6、h_cn',其它语言见下表bn – bengalica – catalancs – czechda – danishde – germanen – englishes – spanishfi – finnishfr – frenchhr – croatianit – italianja – japaneselt – lithuan

7、iannl – dutchpl – polishpt_br – brazilian portugueseru – russiansl – sloveniantr – turkishuk_ua – ukrainianzh_cn – simplified chinesezh_tw – traditional chinese设置主题找到html_theme = 'default',修改default即可。目前官方提供的主题见/theming.htmlbuiltin-themes其它还其它更多设置,详细请参考官方文档。设置好以后,重新make html即可。扩展阅

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论