Re: Gradle/AsciiDoctor: Combining all AsciiDoc files in one?
Posted by mojavelinux on Jul 30, 2015; 10:51pm URL: https://discuss.asciidoctor.org/Gradle-AsciiDoctor-Combining-all-AsciiDoc-files-in-one-tp3589p3593.html
On Thu, Jul 30, 2015 at 6:33 AM, bodiam [via Asciidoctor :: Discussion] <[hidden email]> wrote:
So, I was wondering if there is a way to combine all adoc files in a directory without having to use explicit includes? Either with some AsciiDoc directive or with the Gradle support?
Sounds to me like a good case for a preprocessor. A preprocessor takes and input document (which can be blank) and returns a new reader which may contain any content you feed it. You could scan for files, read them and aggregate them into the reader. In particular, you'll be interested in the "push_include" method which emulates the behavior of an include directive.