Is it possible to include properties file, i.e. comprised of name / value pairs and after include turn those kye/value pairs into document attributes ?
Let's assume we have my.properties file with prop1=value1 So, after include I'd like my document to have attribute prop1 set to value1, like I used following :prop1: value1 |
Administrator
|
This idea is closely related to the following issue: This can be accomplished today using a preprocessor. The preprocessor would read the file, convert the values to a map, assign those values to the document object and return the reader (or null) to proceed. Could be a good extension for the extension lab. See https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/lib/front-matter-preprocessor/extension.rb for an example of a similar extension. (The main difference is that this preprocessor would never touch the reader since it is getting information from a separate file). -Dan On Thu, Apr 21, 2016 at 6:59 AM, eshepelyuk [via Asciidoctor :: Discussion] <[hidden email]> wrote: Is it possible to include properties file, i.e. comprised of name / value pairs and after include turn those kye/value pairs into document attributes ? Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
My main concern - will such extension be working on GitHub ? 21 квіт. 2016 22:40 "mojavelinux [via Asciidoctor :: Discussion]" <[hidden email]> пише:
|
Administrator
|
eshepelyuk wrote: My main concern - will such extension be working on GitHub ? No, it won't. But until GitHub changes their position, the processor can't read secondary files anyway. Not even a change to core would allow the idea to work on GitHub. GitHub only allows the processor to convert an input string with no file access. |
Administrator
|
In reply to this post by eshepelyuk
But to clarify, if you are using this with Jekyll AsciiDoc, and you run the build on your own CI server (or Travis), then yes, you can use the extension. -Dan On Thu, Apr 21, 2016 at 6:32 PM, Dan Allen <[hidden email]> wrote:
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
In reply to this post by mojavelinux
Thank you for detailled reply, Dan. 22 квіт. 2016 03:33 "mojavelinux [via Asciidoctor :: Discussion]" <[hidden email]> пише:
|
Free forum by Nabble | Edit this page |