中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

常見(jiàn)的sphinx的使用方法

2019-02-22    來(lái)源:愛(ài)站科技

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬(wàn)Linux鏡像隨意使用

sphinx工具允許開(kāi)發(fā)人員以文本格式編寫(xiě)文檔,以便滿足不同要求的格式,那么常見(jiàn)的sphinx的使用方法大家都了解嗎?下面就讓西部數(shù)碼技術(shù)頻道小編帶你一起來(lái)了解一下吧!

sphinx使用
進(jìn)入你要?jiǎng)?chuàng)建文檔的目錄,例如要?jiǎng)?chuàng)建在目錄/home/wwwroot/doc下
cd /home/wwwroot/doc
開(kāi)始使用向?qū)?chuàng)建你的文檔項(xiàng)目
sphinx-quickstart
程序會(huì)提示輸入一些選項(xiàng),如輸入根目錄,大部分使用默認(rèn)選項(xiàng),直接按回車即可。

復(fù)制代碼 代碼如下:

Enter the root path for documentation.
> Root path for the documentation [.]:
//輸入跟目錄,直接回車
You have two options for placing the build directory for Sphinx 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, two more directories will be created; "_templates"
for custom HTML templates and "_static" for custom stylesheets and other static
files. You can enter another prefix (such as ".") to replace the underscore.
> Name prefix for templates and static dir [_]:
//直接回車
The project name will occur in several places in the built documentation.
> Project name: F2E Cookbook
> Author name(s): imbingdian
//輸入項(xiàng)目名稱
//輸入作者名稱
The file name suffix for source files. Commonly, this is either ".txt"
or ".rst". Only files with this suffix are considered documents.
> Source file suffix [.rst]: .txt
//檔文件的擴(kuò)展名,默認(rèn)是.rst
//后面的操作基本回車就好


完成后可以看到doc文件中生了以下目錄文件
build--生成文檔目錄
source--源文件目錄
make.bat
makefile
生成html文檔
make html
看一下build目錄下是不是生成了html文檔了?
^_^ enjoy it!
查看demo:http://doc.litejs.com/
sphinx簡(jiǎn)單配置
source目錄下的conf.py文件為sphinx的配置文件。
1)修改文檔語(yǔ)言為中文:
找到#language = None,修改為:language ='zh_CN',其它語(yǔ)言見(jiàn)下表

復(fù)制代碼 代碼如下:


bn – Bengali
ca – Catalan
cs – Czech
da – Danish
de – German
en – English
es – Spanish
fi – Finnish
fr – French
hr – Croatian
it – Italian
ja – Japanese
lt – Lithuanian
nl – Dutch
pl – Polish
pt_BR – Brazilian Portuguese
ru – Russian
sl – Slovenian
tr – Turkish
uk_UA – Ukrainian
zh_CN – Simplified Chinese
zh_TW – Traditional Chinese

2)設(shè)置主題

找到html_theme = 'default',修改default即可。目前官方提供的主題見(jiàn)http://sphinx.pocoo.org/theming.html#builtin-themes

3)其它

還其它更多設(shè)置,具體請(qǐng)參考官方文檔。

設(shè)置好以后,重新make html即可。

通過(guò)西部數(shù)碼技術(shù)頻道小編介紹的常見(jiàn)的sphinx的使用方法,相信大家都有了一定的了解,想要了解更多的技術(shù)內(nèi)容,請(qǐng)繼續(xù)關(guān)注西部數(shù)碼技術(shù)頻道吧!

標(biāo)簽: 代碼 西部數(shù)碼

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:簡(jiǎn)單介紹linux之安裝配置svn獨(dú)立服務(wù)器的步驟

下一篇:Apache2 WEB服務(wù)器的步驟詳解