huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.13k stars 259 forks source link

docs: adding Astro support documentation #1064

Closed Lakelimbo closed 4 weeks ago

Lakelimbo commented 1 month ago

Added guides to use shadcn-svelte on Astro on src/content/installation and src/content/dark-mode, based on the original shadcn instructions as well.

Dark mode

Now dark-mode.md is a folder, containing index.md, svelte.md, and astro.md.

mode-watcher does work by itself there, but because Astro is not a frontend framework, Svelte (or any other UI framework) will always load a bit after the HTML and CSS, causing a noticeable FUOC. Just like in the original shadcn docs, there is also an inline-script which it's may seem sort of redundant with mode-watcher, but it helps eliminating the FUOC entirely (because inline-scripts load before the UI frameworks).

Before submitting the PR, please make sure you do the following

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 5f2c109a7e57ce8b1cc1319daa6d0f9335af51de

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

github-actions[bot] commented 1 month ago
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
shadcn-svelte ✅ Ready (View Log) Visit Preview 5f2c109a7e57ce8b1cc1319daa6d0f9335af51de
AdrianGonz97 commented 4 weeks ago

thank you!

coppinger commented 1 week ago

Thank you very much for this @Lakelimbo! Much appreciated, setting this up was a breeze