Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
hey,
maybe i need to find another (non asciidoctor releated) solution for this, but i thought i'll give it a try: 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. is there a way to mark/tag areas and have control over what to print as PDF / render as HTML? i hope that was clear... :) thanks in advance! cheers, chris |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This sounds like a job for conditional processing: https://asciidoctor.org/docs/user-manual/#conditional-preprocessor-directives Here'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.adocwill only include text that applies to variant A, and $ asciidoctor -a variant-b general.adocwill only include text that applies to variant B. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Well said, @kibukj! Cheers, -Dan On Mon, Mar 11, 2019 at 5:42 PM kibukj [via Asciidoctor :: Discussion] <[hidden email]> wrote: This sounds like a job for conditional processing: ... [show rest of quote] -- Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by ascju
awesome! that is exactly what i need!
thanks, kibukj! |
Free forum by Nabble | Edit this page |