Is it possible to use myst_substitutions or myst_url_schemes within a URL argument of a directive? #972
Unanswered
matterhorn103
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
We're using Sphinx/MyST-Parser/MyST Markdown/Sphinx-Design.
Various external URLs used on our site need to automatically adapt to the current release version being changed in
conf.py
.This is in general done using f-strings within
myst_substitutions
inconf.py
. This works fine up until wanting to use it in some Sphinx-Design buttons that I am trying to make.Previously a particular set of buttons were created within a Sphinx-Design card like so:
The resulting link works fine but the created button has awkward formatting and looks out of place next to the native Sphinx-Design ones, so I tried to turn them into proper buttons:
but the substitution doesn't work.
I've scoured the web and tried
myst_url_schemes
as well as what feels like every possible syntax and nothing works. Why don't any of the syntaxes with ', {, <, ", `, do anything other than pass the literal characters in this situation? Is there any way with MyST-Parser to give a URL argument to a directive as anything other than a simple string?Any help appreciated.
Beta Was this translation helpful? Give feedback.
All reactions