Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include raw html file?

Tags:

asciidoctor

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.

like image 429
nbren12 Avatar asked Apr 26 '26 08:04

nbren12


1 Answers

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.

like image 83
TimJ Avatar answered Apr 30 '26 09:04

TimJ