Skip to content
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 Expressive Code <Code> component to Starlight #1395

Merged
merged 11 commits into from
Jan 26, 2024

Conversation

hippotastic
Copy link
Contributor

@hippotastic hippotastic commented Jan 23, 2024

Description

  • Adds the new <Code> component by Expressive Code to Starlight. For the original component, see here: https://expressive-code.com/key-features/code-component/
  • Re-exports the component from Starlight to match the import syntax of all other user components:
    import { Code } from '@astrojs/starlight/components'
  • Adds an @astrojs/starlight/internal export that provides access to the useTranslations function to components
  • Changes the default behavior of the build:examples script so that the projects are no longer built concurrently. The previous configuration could lead to "Port already in use" errors, and building the examples sequentially fixes this.
  • Adds documentation for the new component to the Components page

Copy link

changeset-bot bot commented Jan 23, 2024

🦋 Changeset detected

Latest commit: 02e30ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

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

Copy link

vercel bot commented Jan 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Jan 26, 2024 7:03pm

@github-actions github-actions bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Jan 23, 2024
@hippotastic hippotastic marked this pull request as draft January 23, 2024 00:56
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super exciting to see you crack this challenging feature — I know so many of our users will be delighted to be able to use this. Thank you @hippotastic! Left a few comments, but I think it’s all small things and docs for the most part. The main feature seems to be working great! Amazing work 🙌

package.json Show resolved Hide resolved
packages/starlight/components.ts Show resolved Hide resolved
docs/src/content/docs/guides/components.mdx Outdated Show resolved Hide resolved
docs/src/content/docs/guides/components.mdx Show resolved Hide resolved
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, added a changeset and will request one last docs check from @sarah11918, but otherwise looks good to go out tomorrow! Thanks @hippotastic 🚀

@delucis delucis added the 🌟 minor Change that triggers a minor release label Jan 25, 2024
Co-authored-by: Sarah Rainsberger <[email protected]>
@hippotastic
Copy link
Contributor Author

I'm happy with the Sarah-fied version!

@delucis delucis merged commit ce05dfb into withastro:main Jan 26, 2024
9 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jan 26, 2024
@delucis delucis mentioned this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants