docs: Implement Sandpack component for interactive examples in documentation #338
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.
I add a Sandpack component that lets users try out code directly in the documentation using CodeSandbox.
In this PR, it's only applied to the
chunk
function. If merged, I hope to gradually add it throughout the docs, making them easier for users to understand.This feature is already reflected in the official documentation for es-hangul(toss/es-hangul#200) and suspensive(toss/suspensive#963).
I'm also attaching the issue that was raised in slash toss/slash#191
2024-08-03.7.55.34.mov
How to use
In the markdown file, write it like this
For more detailed instructions on how to write this, please refer to vitepress-plugin-sandpack document.