How to include raw html file?

亡梦爱人 提交于 2019-12-12 18:32:24

问题


In rst, I can easily include a raw html file using the raw directive as follows:

.. raw:: html
    :file: some_file.html

Is there a simple way to do this with asciidoctor? I understand that if I wrap the contents of some_file.html with ++++ that I can then use include:: in asciidoc, but I would like to avoid manually editing some_file.html.


回答1:


Asciidoctor allows you to put includes into a passthrough block, ideally surrounded by empty lines, like this:

++++
include::some_file.html[]
++++

Adding empty lines around this prevents interpretation of the included file contents as continuations of the adoc text surrounding the include, as described in the manual.



来源:https://stackoverflow.com/questions/46960524/how-to-include-raw-html-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!