Skip to content

Get current version in markdown files #100

@j2bbayle

Description

@j2bbayle

First of all, thanks a lot for this super-useful package!

I'm currently building a multi-version documentation, mostly written in Markdown using myst-parser. Everything works fine, except that I can't seem to be able to use substitutions (https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2) to access the current_version variable.

I've made sure that 'substitution' was in my myst_enable_extensions, and I've tried to use

{{ current_version.name }}

as well as

{{ env.config.current_version.name }}

but none of these are defined.

Is there a way to access this variable (defined in the HTML context)?

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionNon-actionable user question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions