如何覆盖Seealso :: Directive in Sphinx中的指示?
我正在项目中使用sphinx,我想更改'另请参阅标题 seealso ::
在模板中的框。 我还在代码中搜索了一点,并在狮身人面表库中看到了Seealso类,但我不知道如何覆盖它并更改标题。
I'm using Sphinx in a project and I wanna change 'See also' title in top of the seealso::
's box in the template.
I also searched a little in the codes and saw the SeeAlso class in the Sphinx library but I have no idea how to override it and change the title.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我终于找到了一种我认为是简单的方法!
我的问题是能够更改seealso ::
in locale fold
(phinx/locale/locale/__ init __ init __. py)
等seealso ::(例如seealso ::)的标题,有一个名为consonitionlabels
code>代码>,标题是在此处定义的。要在项目中更改它,我们只需在项目的config.py中添加此代码:
当我们使用
时
Well, I finally found a way that I think is the simple one!
My question was to be able to change the title of sphinx specific admonitions like seealso::
In the locale folder
(sphinx/locale/__init__.py)
, there is a dictionary namedadmonitionlabels
, that the titles are defined here.To change it in the project, we just add this code in the project's config.py:
and when we use
make html
sphinx will apply our new title to the project