在Sphinx中将codesnippet转换为HTML代码?

问题描述

一般来说,我对Sphinx和HTML,CSS等都是陌生的。

this示例中,以下代码

<xsl:value-of select="." disable-output-escaping="yes"/>

生成以下HTML代码

.. toggle-header::
    :header: Example 1 **Show/Hide Code**

        Content for header

我想知道我是否可以以类似的方式生成自己的HTML代码。 因此,例如这段代码

<div class="toggle-header open">
    <p>Example <strong>Show/Hide Code</strong></p>
</div>
<div class="toggle-content docutils container">
    Content for header
</div>

生成此HTML:

.. mybutton::
    :id: Demo

    Attribute
    Content

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)