我正试图抓住鹈鹕。
我需要一个特性,以便我可以将一些直接的 HTML 文件放入以 rst 格式编写的博客文章中。我还希望渲染这些 HTML 文件。
用例是这样的:我想展示一些 html 代码以及它在浏览器上的样子。
PS:我知道如何附加代码块,但这个要求与此相反,我希望 HTML 文件被实际呈现,而不是受到保护。
我正试图抓住鹈鹕。
我需要一个特性,以便我可以将一些直接的 HTML 文件放入以 rst 格式编写的博客文章中。我还希望渲染这些 HTML 文件。
用例是这样的:我想展示一些 html 代码以及它在浏览器上的样子。
PS:我知道如何附加代码块,但这个要求与此相反,我希望 HTML 文件被实际呈现,而不是受到保护。
You can give the HTML subheading to the raw directive and the content will be rendered.
.. raw:: html
<p> I need a feature, so that I can put some direct HTML in the blog articles written in <b>rst</b> format. I also want those htmls to be rendered.</p>
See here: How to embed HTML in restructured text file?
please note: there must be a newline between the ..raw::
directive and the actual raw html.