File to URL mapping
In Routify, files in
src/pages correspond to URLs.
index.sveltefiles corresponds to both
src/pages/admin/[business].svelte corresponds to
/admin/:business, where :business is a parameter.
Files and directories prefixed with underscore will not be picked up by Routify. (except for
Layouts and resets
Layout files are named
_layout.svelte and apply to all adjacent and nested Svelte files. A file can have multiple layouts if multiple layouts are recursively present in parent folders.
Reset files are named
_reset.svelte. They function like layout files, but do not inherit the parent scope (layouts, props, etc.).
404 and fallbacks
404s can be caught with
_fallback.svelte. The first
_fallback.svelte that's found while traversing back through parent folders will be used.
Fallback inherits layout. In certain cases, the style
position:fixed is useful for a fullscreen fallback.