vercel-sveltekit-news-demo Svelte Themes

Vercel Sveltekit News Demo

SvelteKit + Vercel News Demo

A SvelteKit "news" site running on Vercel. Showcasing the following features:

  • Rendering modes: /about page is prerendered, home page is server-side-rendered, /admin page is an SPA, articles use Vercel ISR
  • Articles are ISR'd, with the possibility to refresh their "Last updated" timestamp (i.e. regenerate the articles) using the hidden /admin page
  • Vercel Toolbar: Visible during local development and on preview deployments. Contains a flag for making the headlines on the home page bigger

Deployed to production at https://vercel-sveltekit-news-demo.vercel.app/

UI (HTML+CSS) generated by v0: https://v0.dev/chat/2eFQlSKcbM8?b=b_LQsccfE

Setting it up

  • pnpm install
  • vercel to deploy somewhere
  • node -e "console.log(crypto.randomBytes(32).toString('base64url'))"
  • vc env add FLAGS_SECRET and copy just created string into the prompt
  • vc env pull to get all values into a local .env file
  • pnpm dev to run locally

Top categories

Loading Svelte Themes