Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get current version in markdown files #100

Open
j2bbayle opened this issue Mar 8, 2023 · 2 comments
Open

Get current version in markdown files #100

j2bbayle opened this issue Mar 8, 2023 · 2 comments
Labels
type:question Non-actionable user question

Comments

@j2bbayle
Copy link

j2bbayle commented Mar 8, 2023

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!

@skabbit
Copy link

skabbit commented Jun 20, 2023

Got the same question regarding current version in rst files.

@kbonney
Copy link

kbonney commented Jun 23, 2023

Is this what you are looking for: https://holzhaus.github.io/sphinx-multiversion/master/context.html

@BurningEnlightenment BurningEnlightenment added the type:question Non-actionable user question label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Non-actionable user question
Projects
None yet
Development

No branches or pull requests

4 participants