sikhaid-routing

Document SikhAid SvelteKit file-based routing, dynamic segments, and layouts.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/the-non-expert/SikhAidSPA --skill sikhaid-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sikhaid-routing
Source: https://github.com/the-non-expert/SikhAidSPA/tree/main/.claude/skills/sikhaid-routing
Command: npx skills add https://github.com/the-non-expert/SikhAidSPA --skill sikhaid-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill clarifies SikhAid's routing conventions and navigation patterns, speeding up the implementation of routes and dynamic pages.

Core Features & Use Cases

  • File-based Routing: Understand SvelteKit file structure for pages and layouts.
  • Dynamic Routes: Use [slug] segments to render content from params.
  • Use Case: Build /campaigns/:slug page with a dynamic parameter.

Quick Start

Create a new public page under src/routes, e.g., /products, with a +page.svelte and hook it into the header navigation.

Frequently Asked Questions about sikhaid-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up file-based routing in SvelteKit?

File-based routing in SvelteKit maps your src/routes directory structure directly to URL paths. Create folders for route segments and add +page.svelte files to define pages; SvelteKit automatically generates routes from your file organization without manual configuration.

How do I create dynamic routes with [slug] segments in SvelteKit?

Dynamic routes use [slug] folder names to capture URL parameters. Create src/routes/[slug]/+page.svelte and access the parameter via page.params.slug in your component to render content based on the URL segment.

What's the best way to organize public and admin routes in SvelteKit?

Organize routes by creating separate folder hierarchies: public pages under src/routes (home, about, campaigns) and admin sections under src/routes/admin. Use layout files (+layout.svelte) to apply shared styling and logic to route groups.

How do I use layout hierarchies to share navigation across multiple pages?

Create +layout.svelte files at different levels in src/routes. Layouts automatically wrap child pages, letting you define header navigation, sidebars, or styling once and inherit them across related routes.

Can I use dynamic routes for blog posts and campaign pages in SvelteKit?

Yes. Create src/routes/blog/[slug]/+page.svelte or src/routes/campaigns/[slug]/+page.svelte to render individual posts or campaigns. Extract the slug from page.params and fetch or render the corresponding content.

What are the limitations of file-based routing in SvelteKit projects?

File-based routing requires strict folder structure adherence; unconventional URL patterns need workarounds. Complex conditional routing or highly dynamic paths may require additional load functions or hooks beyond basic file organization.