ascju wrote
I have a user documentation written in asciidoc and now plan on having multiple versions of this product.
These products mainly differ in functionality which is not included in all versions, so basically all documentation is identical except there are parts which do not apply to one product and are only available in the other one.
This sounds like a job for conditional processing:
https://asciidoctor.org/docs/user-manual/#conditional-preprocessor-directivesHere's an example:
= General
This text applies to all versions of the product.
ifdef::variant-a[]
This text only applies to variant A of the product.
endif::[]
ifdef::variant-b[]
This text only applies to variant B of the product.
endif::[]
You can then control which information is presented with the -a (or --attribute) flag to asciidoctor:
$ asciidoctor -a variant-a general.adoc
will only include text that applies to variant A, and
$ asciidoctor -a variant-b general.adoc
will only include text that applies to variant B.