rosscdh / mkdocs-markdownextradata-plugin

A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template
MIT License
84 stars 17 forks source link

Feature Request: Support Jinja2 config from mkdocs.yml #28

Closed miffels closed 4 years ago

miffels commented 4 years ago

I just ran into an issue where the Markdown source docs would contain Jinja2-like syntax that lead to errors, more specifically the following:

{#someVariableBindingString}

This is misinterpreted (even though it was in a code block) as a Jinja2 comment due to the initial {#. I see two options here:

  1. Make the plugin syntax-aware and ignore variables in code blocks
  2. Support feeding in Jinja2 options as shown in different delimiters in jinja2 and API

I believe 1) to be more of a feature than an issue, and 2) appears like it would enable everyone to customize this plugin to their heart's content. I believe, therefore, that 2) is the way to go.

Will open a PR in a few minutes with a draft.

miffels commented 4 years ago

@rosscdh is that a no? :joy:

Either way, the work is done. See #29.