I'm using asciidoctor-maven-plugin to convert .adoc files to html file... Would want to include a link to javascript in the generated html file... Basically would like to see something like below in the html file that is generated from the .adoc file
<script src="custom.js"></script>
Tried setting attributes like linkcss scriptsdir etc..but of no luck...
Any help?
One way is like in http://mrhaki.blogspot.ie/2014/06/awesome-asciidoc-include-raw-html.html
But then have to add it in every .adoc file...is there a way to get it automatically added just like the CSS (using stylesheet)
To define a link in Asciidoc markup we only have to type the URL followed by an optional text for the link in square brackets ( [text link] ).
The AsciiDoc syntax is more concise than (or at least as concise as) Markdown. At the same time, AsciiDoc offers power and flexibility without requiring the use of HTML or “flavors” for essential syntax such as tables, description lists, admonitions (tips, notes, warnings, etc.) and table of contents.
AsciiDoc is a plain text markup language for writing technical content. It's packed with semantic elements and equipped with features to modularize and reuse content. AsciiDoc content can be composed using a text editor, managed in a version control system, and published to multiple output formats.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With