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

docs: add Astro integration page #1283

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

JoshuaKGoldberg
Copy link
Contributor

Adds an Astro page per discussion in #678 (comment) -> #1266.

@bejzik8 answered flawlessly so this shamelessly steals that explanation 😄. Hence the co-author attribute below.

Co-authored-by: Mirko Basic bejzik8@gmail.com

Copy link

changeset-bot bot commented Jan 23, 2024

⚠️ No Changeset found

Latest commit: 8840e17

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

---

<button class={button}>Click Me!</button>
```
Copy link
Contributor Author

@JoshuaKGoldberg JoshuaKGoldberg Jan 23, 2024

Choose a reason for hiding this comment

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

This shows up as unstyled for me. 😬

Screenshot of the astro code block with no syntax highlighting

I took a peek at the CompiledCode and SyntaxHighlighter system but didn't want to make too many changes. I was scared. What would you all advise be done here?

FWIW the progress I made was trying to import and register the markup syntax highlighting language for Astro, but that didn't get all the way:

// @ts-ignore
import markup from 'react-syntax-highlighter/dist/esm/languages/prism/markup';
SyntaxHighlighter.registerLanguage('astro', markup);

Copy link
Contributor

Choose a reason for hiding this comment

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

After a bit of digging, it looks like it will take a lot of work to have syntax highlighting for Astro files. Given it's only used on this page, I think we're ok with not having it.

@b8zeek
Copy link

b8zeek commented Jan 23, 2024

Adds an Astro page per discussion in #678 (comment) -> #1266.

@bejzik8 answered flawlessly so this shamelessly steals that explanation 😄. Hence the co-author attribute below.

Co-authored-by: Mirko Basic bejzik8@gmail.com

Thanks for the props @JoshuaKGoldberg, much appreciated ser! 🙏

Comment on lines +51 to +52
```tsx
// Button.astro
Copy link
Contributor

Choose a reason for hiding this comment

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

Bit of a hack, but it's not stupid if it works 😅

Button.astro

@mrm007 mrm007 enabled auto-merge (squash) January 25, 2024 03:01
@mrm007
Copy link
Contributor

mrm007 commented Jan 25, 2024

Thank you @JoshuaKGoldberg!

@mrm007 mrm007 merged commit 39909db into vanilla-extract-css:master Jan 25, 2024
5 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the integrations-astro branch January 25, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants