Advanced Usage
SvelteKit
Advanced prerender and preview patterns for SvelteKit applications using Paragraph CMS.
SvelteKit's advanced integration work focuses on clear prerender coverage, predictable dynamic route generation, and a clean split between published static output and draft preview flows.
Rendering strategy
- use
prerenderfor stable routes and explicitentriesfor CMS-driven dynamic paths; - keep shared content in layout loads and page content in route-specific server loads;
- choose adapter and trailing slash behavior early so generated files match hosting expectations; and
- avoid client-only fallbacks on content-heavy routes unless you accept the SEO and performance tradeoffs.
Preview and publishing
- keep preview on server-rendered routes or a dedicated preview deployment;
- use separate credentials for published and draft content;
- regenerate prerender entries after publish; and
- expose missing dependency errors clearly when a page references unpublished or locale-missing content.
Operational guardrails
- monitor the size of prerendered route sets as the CMS grows;
- ensure asset URLs and rich content transforms are deterministic at build time;
- document which routes can stay
'auto'and which must always be prerendered; and - treat route-generation logic as part of application code review, not just editorial configuration.