用于在 ReStructured Text 页面中包含原始 HTML 文件的指令
Directive for including a raw HTML file in a ReStructured Text page
我正在呈现一个 .rst
页面。我想在其中创建一个 IFrame
,其中包含来自同一目录的 example.html
页面,或者找到一些类似的替代方法在页面上托管 HTML
。实现此目标的最简单方法是什么?
到目前为止,我已经尝试了几种方法。 (1):
.. include:: ./example.html
这会将 HTML 呈现为文本文件。
(2):
.. raw:: html
<iframe src="./example.html" marginwidth="0" marginheight="0" scrolling="no" style="width:960px; height:600px; border:0; overflow:hidden;">
</iframe>
这会导致嵌入 404 页面(但是一旦我将所有内容都托管在服务器上,它会正确显示吗?)。
我建议使用包含文件指令,然后在要包含的 html 文件中使用:
.. raw:: html
html content
我正在呈现一个 .rst
页面。我想在其中创建一个 IFrame
,其中包含来自同一目录的 example.html
页面,或者找到一些类似的替代方法在页面上托管 HTML
。实现此目标的最简单方法是什么?
到目前为止,我已经尝试了几种方法。 (1):
.. include:: ./example.html
这会将 HTML 呈现为文本文件。
(2):
.. raw:: html
<iframe src="./example.html" marginwidth="0" marginheight="0" scrolling="no" style="width:960px; height:600px; border:0; overflow:hidden;">
</iframe>
这会导致嵌入 404 页面(但是一旦我将所有内容都托管在服务器上,它会正确显示吗?)。
我建议使用包含文件指令,然后在要包含的 html 文件中使用:
.. raw:: html
html content