docs | 使用 sphinx 转化rst文件为html文档

1. 效果图

book 风格。
在这里插入图片描述
优点:

  • 极简风格
  • 右边有标题导航
  • 左侧是文件导航,可隐藏

2. 使用方式

reST 格式,比markdown格式更复杂。
推荐使用 book 风格。
文档构建工具是 sphinx,是一个python包。

$ pip3 list | grep -i Sphinx
Sphinx                        7.3.7
sphinxcontrib-applehelp       1.0.8
sphinxcontrib-devhelp         1.0.6
sphinxcontrib-htmlhelp        2.0.5
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.7
sphinxcontrib-serializinghtml 1.1.10


$ pip3 install sphinx-book-theme

# conf.py 
html_theme = 'sphinx_book_theme'

$ make html

注意:上文包名字的下划线_和减号-的区别。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值