docs: snippet variable substitution in code blocks#5941
Closed
mintlify-development[bot] wants to merge 1 commit into
Closed
docs: snippet variable substitution in code blocks#5941mintlify-development[bot] wants to merge 1 commit into
mintlify-development[bot] wants to merge 1 commit into
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents that snippet props passed as string values are now substituted into fenced code blocks inside the snippet, using the same
{propName}syntax already used in prose.Changes
create/reusable-snippets.mdxwith an{packageManager}/{packageName}example.{...}placeholders are left unchanged, so existing code samples are not affected.Context
Snippet components can now expose string props inside fenced code blocks, not just prose and JSX expressions, making it easier to share commands and config that vary per importing page.
Note
Low Risk
Low risk documentation-only change that adds guidance and examples; no runtime code paths are modified.
Overview
Documents that snippet props can be substituted inside fenced code blocks (not just prose) using the existing
{propName}placeholder syntax, with a new install-command example.Adds a note clarifying that only string props are substituted in code blocks and unmatched placeholders remain unchanged, and mirrors the new subsection across the Spanish, French, and Chinese translations.
Reviewed by Cursor Bugbot for commit 77aab7c. Bugbot is set up for automated code reviews on this repo. Configure here.