Conditional text processing + true variables
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
Hello,
I would like to know if there are any thoughts about adding conditional text and real variables to docFX:
- Conditional text is done by adding a tag structure around text in the markdown content. Antora does it with conditional directives **ifdef**, **ifndef**, and **ifeval**. You would need to specify on build which tags are to be included or not; this could be done at the file level in the TOC, for example.
- Variables are needed with the conditional text to use single sourcing of content. For example, if I have a variable `env` in an article, I can set it to UAT in one apparition in the TOC and PRD in another apparition in the TOC.
.
docFX does have an `includes` feature, but without variables this has limited use, really just for boilerplate (unchanging) text.
Of course, this is a big step up in complexity for a straightforward doc-as-code system, and I understand if this might be considered out-of-scope for docFX, but I'd like to know if anything like this is under consideration.
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.