gpt4 book ai didi

python-sphinx - 在 python-sphinx 生成的页面上显示警告框

转载 作者:行者123 更新时间:2023-12-04 01:56:35 25 4
gpt4 key购买 nike

如何在使用 sphinx-build 生成的 html 中显示警告框?

Warning

Do not use the directives sectnum, header and footer.

我想将上面的消息显示为这样的:
image of warning message in box (抱歉,所以不允许我在这里的帖子中嵌入图像)
请忽略文本格式,我的主要目的是显示一个带有一些文本的框以引起用户的注意 like on sphinx-doc site

最佳答案

您想要的 reStructuredText 语法用于名为 admonition directives 的东西.

该特定示例存在于 documentation source 中:

.. warning::

Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
:dudir:`footer`.

关于python-sphinx - 在 python-sphinx 生成的页面上显示警告框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50069941/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com