Conditional text
Adam Kvítek
It would be great to have conditional text in MDX files. For example: We have a code snippet in MDX file. This file is imported into two Markdown files, in each file, some parts of the code snippet need to be either hidden or displayed. (Note: I think that Hugo, Asciidoc and Markdoc have similar functionality.)
Adam Kvítek
I used to work with AsciiDoc where similar functionality is available: https://docs.asciidoctor.org/asciidoc/latest/directives/conditionals/
It seems that Hugo can do similar stuff https://www.mikedane.com/static-site-generators/hugo/conditionals/ and Markdoc also: https://markdoc.dev/docs/functions
T
Troy Donovan
A developer has helped us set up LaunchDarkly in Docusaurus that can be used to include or exclude content within individual files. It falls down in that you can't apply it to entire files and/or sidebar entries -- one stumbling point is that it messes up the browse sequence if a file is toggled off in the output.
The ideal would be conditions similar to how Madcap Flare uses them so that we can decide whether to include in-page content or whole pages (taking into account how sidebars are affected). This would really help to use one set of source docs for a multiple potential outputs.