-
-
Notifications
You must be signed in to change notification settings - Fork 571
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
Add <Aside>
component
#1499
Add <Aside>
component
#1499
Conversation
🦋 Changeset detectedLatest commit: 89577ae The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
size-limit report 📦
|
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.
I had initially thought it would be ideal to share the HTML-building logic between this component, but when I looked at it, it felt kind of silly: the component is so simple that pulling the full hastscript pipeline feels wrong. It does mean some duplication — changes would require updating in two places — but given how minimal this is, I think this is OK.
I guess one could say that we could extract the variants and isAsideVariant
from the remark plugin but considering we are already duplicating the SVGs and that we are not likely to have to update the variants often, I think it's fine to keep it as is and that it was a good call to not pull everything 👍
Really simple and nice component with a great error message for invalid types 🌟
Approving for later.
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.
Looks good to me! 💜
Description
Aside
Astro component to our@astrojs/starlight/components
module.:::note
-style asides available in Markdown and MDX.Notes
I had initially thought it would be ideal to share the HTML-building logic between this component, but when I looked at it, it felt kind of silly: the component is so simple that pulling the full hastscript pipeline feels wrong. It does mean some duplication — changes would require updating in two places — but given how minimal this is, I think this is OK.
This PR copy/pastes the
urlToSlug()
helper added in "Virtual" pages prototype #1175 so it can use it — will resolve the conflicts once "Virtual" pages prototype #1175 is merged.