Skip to content

Add theme system, error page, and sitemap to SvelteKit site template - #180

Merged
timkpaine merged 2 commits into
mainfrom
tkp/site-sveltekit-theme
Aug 29, 2026
Merged

Add theme system, error page, and sitemap to SvelteKit site template#180
timkpaine merged 2 commits into
mainfrom
tkp/site-sveltekit-theme

Conversation

@timkpaine

@timkpaine timkpaine commented Aug 29, 2026

Copy link
Copy Markdown
Member

Brings the SvelteKit site template up to the shape the personal site had grown into on its own, so future sites inherit it instead of rebuilding it.

  • Persisted light/dark theme: an inline app.html script resolves localStorage then prefers-color-scheme before paint (no flash), and a toggle in the layout keeps data-theme, color-scheme, and the theme-color meta in sync.
  • app.css moves to CSS custom property tokens (paper, ink, muted, line) exposed to Tailwind v4 via @theme inline.
  • Adds +error.svelte, a prerendered sitemap.xml endpoint, and a brand-initial favicon.svg.
  • +layout.ts sets trailingSlash for the static adapter.
  • Playwright gains a mobile viewport and visual regression snapshots. Visual specs are skipped when CI is set, since baselines are machine-specific and none ship with the template; record them locally with pnpm test:e2e:update.
  • The accessibility audit now runs in both themes with reduced motion, and filters to serious and critical violations.

Adds a persisted light/dark theme with a no-flash inline script and CSS
custom property tokens, an error page, a sitemap endpoint, and a favicon.

Playwright gains a mobile viewport and visual regression snapshots, which
are skipped when CI is set. The accessibility audit now runs in both
themes with reduced motion.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine merged commit 195919b into main Aug 29, 2026
19 checks passed
@timkpaine
timkpaine deleted the tkp/site-sveltekit-theme branch August 29, 2026 23:28
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.

1 participant