Flattening documents with include::[]
Posted by jheckey on Apr 23, 2019; 12:56am
URL: https://discuss.asciidoctor.org/Flattening-documents-with-include-tp6861.html
Is there a way to run asciidoctor to output a single .adoc file with all of the various text included? I have written up a brief hacky version in Python because I'm don't really know Ruby (not opposed, just limit time to learn) to change the source properly.
I'm working on a project that has multiple documents reusing includes::[]. The documents themselves have revision numbers that we use for tracking, but we want to keep canonical snapshots of the documents (images are handled by just creating a new version of the image) for legacy and comparison purposes. If the include files change, that would change the "canonical" document, so keeping the flat text would be preferred, especially for human readability.