feat: add ShikiTransformer support to the <Code /> component#11197
feat: add ShikiTransformer support to the <Code /> component#11197matthewp merged 8 commits intowithastro:mainfrom
ShikiTransformer support to the <Code /> component#11197Conversation
🦋 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>
|
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 |
TheOtterlord
left a comment
There was a problem hiding this comment.
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>
sarah11918
left a comment
There was a problem hiding this comment.
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 atransformersprop 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
transformersprop 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.