How to include a javascript in Asciidoc?

若如初见. 提交于 2019-12-04 03:46:42

You can use the passthrough block for that using ++++:

++++
<p>
Content in a passthrough block is passed to the output unprocessed.
That means you can include raw HTML, like this embedded Gist:
</p>

<script src="http://gist.github.com/mojavelinux/5333524.js">
</script>
++++

Source: http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#more-delimited-blocks

Use docinfo files, see the documentation for more detail.

You create docinfo files by adding another file named <doc_file_name>-docinfo.html for HTML generation or <doc_file_name>-docinfo.xml for docbook generation. The contents of the docinfo file are copied into the generated output, in the head section for html. If you want to add things to the bottom of the document there are footer docinfo files for that. It follows the same as a normal docinfo but the file name is <doc_file_name>-docinfo-footer.html or <doc_file_name>-docinfo-footer.xml

Happy docing :) Let me, or preferably the list know of any other maven issues you find.

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