About swyxkit!

This is swyx’s preferred starter for Svelte projects:

  • SvelteKit
  • Tailwind 3 + Tailwind Typography
  • Netlify
  • GitHub Issues as CMS

Feel free to rip out these opinions as you see fit of course.

Live Demo

See https://swyxkit.netlify.app/

screenshot of swyxkit in action

screenshot of swyxkit in action

Key Features and Design Considerations:

⚠️ known issue - syntax highlighting of mdsvex currently adds extra @html for no reason. We use a workaround

Setup

npx degit https://github.com/sw-yx/swyxkit
export GH_TOKEN=your_gh_token_here # can skip if just trying out this repo casually
npm install
npm run start

You should be able to deploy this project straight to Netlify as is, just like this project is.

Before deploying, remember to configure /lib/siteConfig.js - just some hardcoded vars i want you to remember to configure.

This blog uses GitHub as a CMS - if you are doing any serious development at all, you should give process.env.GH_TOKEN to raise rate limit from 60 to 5000. Just make a really basic personal access token, should be enough. https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting

When deploying, don’t forget to set it in Netlify: https://app.netlify.com/sites/YOUR_SITE/settings/deploys#environment

Further Reading

You can read:

Acknowledgements

Todos

  • implement etag header for github api
  • store results in netlify build cache
  • separate hydration path for mobile nav
  • custom components in MDX, and rehype plugins