栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

自定义sphinxdoc主题

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

自定义sphinxdoc主题

我只想在我的狮身人面像文档中添加ReST删除线。这是我的做法:

$ cd my-sphinx-dir$ mkdir -p theme/static$ touch theme/theme.conf$ touch theme/static/style.css

theme/theme.conf

[theme]inherit = defaultstylesheet = style.csspygments_style = pygments.css

(这使其看起来像默认主题(图2))

theme/static/style.css

@import url("default.css"); .strike {    text-decoration: line-through;}

然后,在您的conf.py中:

html_theme = 'theme' # use the theme in subdir 'theme'html_theme_path = ['.'] # make sphinx search for themes in current dir

此处更多信息:https :
//sphinx.readthedocs.io/en/master/theming.html。

(可选)在global.rst中:

.. role:: strike   :class: strike

并在example.rst中:

.. include:: global.rst:strike:`This looks like it is outdated.`


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/633721.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号