-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: add ShikiTransformer
support to the <Code />
component
#11197
Conversation
🦋 Changeset detectedLatest commit: 075fa07 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
Thank you, @braebo, for the contribution! We want to ship this feature in v4.11, and in order to do so, we would appreciate it if you could expand the changeset a bit, maybe by showing an example of how this new feature can be used, using a markdown code block. |
Example added! Lmk if that works @ematipico I'm actually using the component for a new docs page if you want to see it in action 🙏 https://pocket-shader.braebo.dev |
I added some docs here: withastro/docs#8559 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick review for the example in the changelog
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature addition @braebo ! Just left a small suggestion for a line for the changeset that I think would be a helpful inclusion. See what you think!
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Thanks Fractal, finally someone helping with the astro development |
Changes
<Code />
now accepts atransformers
prop and forwards it to the highlighter.Testing
I tested the transformers and they work like a charm!
Docs
/cc @withastro/maintainers-docs for feedback!
I just assumed the
transformers
prop would work out of the box, and the prop is already documented with tsdoc with links to shiki's docs, so I'm not certain docs are necessary on this end. Nevertheless, a mention of the new prop in the docs wouldn't hurt.