Hi!
I have the following scenario: I am writing a documentation for a product. The whole text is within one content file (markdown). This product now has different editions, so the documentation could slightly differ partially. One sentence / illustration here and there.
I want to have one content markdown file with conditional blocks, and I want to generate multiple single page from this one content file, displayed in the same site.
Could anyone give me help with this?
I already created a conditional shortcode which uses a params value. So if I set a specific parameter in the config file, I can generate different sites from one content with conditional blocks in the content markdown.
This is my conditional shortcode template:
{{ if (eq (trim (index .Site.Params (.Get 0)) " " | lower) (.Get 1)) | and (isset .Site.Params (.Get 0)) }}
{{ .Inner }}
{{ end }}
Could be used like this:
{{% condtext edition a %}}
Content only appearing, if config.toml has edition = "a" in params.
{{% /condtext %}}
Thank you for your guidance and help!