Can't use a reusable snippet inside a code block #591
Replies: 3 comments 1 reply
-
Is anyone around to comment on this? cc @hahnbeelee @handotdev |
Beta Was this translation helpful? Give feedback.
-
FYI, here's a reply from Mintlify support regarding this:
|
Beta Was this translation helpful? Give feedback.
-
You can force a workaround using snippets and HTML. The problem is anything with
Then when you want to use it in another file:
And use HTML instead of the code block component:
Now you should be able to update |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My docs contain references to the current version of a product in multiple places. I want to maintain the current version as a variable in a reusable snippet and fetch the latest version from GitHub inside that snippet.
However, while testing how snippets work, I've found that while I can expand the variable to paragraphs or headers, I can't do it in code blocks.
Here's the snippet:
Here's the target file:
The reason this matters is that most of our installation guides are terminal command instructions, like this:
I understand why this may not work out of the box, but is there some kind of special syntax or a different workaround that I could use?
Beta Was this translation helpful? Give feedback.
All reactions