sphinx使用及其簡單配置_第1頁
全文預覽已結(jié)束

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、sphinx使用及其簡單配置一、sphinx用法進入你要創(chuàng)建文檔的名目,例如要創(chuàng)建在名目/home/wwwroot/doc下cd /home/wwwroot/doc開頭用法向?qū)?chuàng)建你的文檔項目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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論