docascode/docfx-feature-proposals

Allow variable substitutions from parameters passed through the docfx.exe command line

icnocop asked for this feature over 3 years ago — 1 comment

icnocop commented over 3 years ago

I'd like to be able to substitute variables passed through the docfx.exe command line in both metadata and markdown.

For example when I run docfx.exe docfx.json -var { "currentYear": 2017 }, then I expect docfx.exe to substitute all appearances of "{{currentYear}}" with "2017" in both metadata and markdown.

For example, I'd like to inject the current year within "_appFooter".

For example, given the following metadata: "_appFooter" : "© {{currentYear}} My Corporation."

I'd like the generated footer to contain © 2017 My Corporation..

This type of variable substitution should also be possible in markdown files.

Thank you!

Join the discussion!

Sign-in with GitHub to comment