Include with Glob expression
Posted by asotobu on Jul 01, 2013; 6:08am
URL: https://discuss.asciidoctor.org/Include-with-Glob-expression-tp357.html
Hello,
in Asciidoctor we can include external files into one document by using the include:
include::basics.adoc[]
I think it could be a nice addition if we could use a glob expression instance of a concrete file so, for example we can do something like:
include::**/narrative.txt[]
Basically I am thinking about next use case:
Developers are using Thucydides (and JBehave) for BDD. In Thucydides you can add files called narrative.txt where you can describe using plain text a description of the scenario under test. Thucydides supports AsciiDoc format in narrative.txt files but they are rendered when you run Thucydides report tool. The problem is that maybe you want to have all these scenario files being a part of your project documentation. With current include approach, you will need to add one by one all narrative files inside a parent adoc file, which could be very tedious and hard to maintain. On the other hand if you could do something like
include::**/narrative.txt[]
Then every time you render your documentation, you can be assure that the last scenarios are inserted into rendered files.
What do you think? If you find useful I can create an issue on github and implement a possible solution.
Alex.