Re: Maven plugin and extensions
Posted by
torngat on
May 20, 2015; 7:23pm
URL: https://discuss.asciidoctor.org/Maven-plugin-and-extensions-tp3149p3246.html
Hi Dan,
mojavelinux wrote
Aren't you missing the closing square brackets? Or did you just type it
incorrectly in the e-mail message?
Sorry, they were missing in my message but I had them in code. FYI, I tried the following variations (blank lines only for readability in this post):
----
/ example 1 - this works
= Asciidoctor.convert(IO.read("#{attr 'generated_dir''}/example/response-fields.adoc"), base_dir: @document.base_dir, safe: @document.safe)
/ example 2 - this gives an HTML link to file "/my/generated_dir/example/response-fields.adoc"
asciidoc:
include::#{attr 'generated_dir'}/example/response-fields.adoc[]
/ example 3 - this shows plain text path "/my/generated_dir/example/response-fields.adoc[]"
asciidoc:
include::"#{attr 'generated_dir''}/example/response-fields.adoc[]"
----
Aside from example #1 that works, the only one that appears to be doing something is #2 where the result is a URL to the document instead of the content of the document being included. I toggled the ":allow-uri-read:" property in the parent document but that didn't change anything. FYI, the document's safe mode is already 0.
Cheers!
Sebastien