Closed ggrossetie closed 1 year ago
I would say yes, use includes where you see fit. I don't think we should be concerned about too many includes as long as the include by itself can be viewed as a unit of information. I don't like includes (or even attributes) to replace single words or a short phrase as that just becomes excessive and hard to maintain.
The Antora platform on which the docs are now based make this possible, even across projects.
As part of improving the Asciidoctor.js documentation, I came across this useful appendix that describe the Ruby API options.
As you may know, the JavaScript API options are very similar but with a few exceptions:
eruby
):
(ie. symbol) while in JavaScript the name is just a Stringasciidoctor.js
CLI is still experimental)To keep the documentation as DRY as possible, I think we should reuse the content.
My first attempt was to use custom attributes to share the description of each option:
And then use attribute substitution:
Upon reflection, it's not a good idea because attributes can not include AsciiDoc block content (and more broadly should not be used to hold content).
Instead I think we should use the include directive to include specific regions of content.
Does it make sense ? Should we be concerned by the number of include ? Do you think it's a good idea ?