%layout.svelte and [param].svelte
See original GitHub issueAdding my suggestion for what special filenames should look like, re #1149
%layout.svelte
@Rich-Harris suggested % for params, which I feel strongly would rather be the ideal option for the prefix. Can’t see any downside with this.
- Unsafe for URL pathname
- Safe for filenames and terminal link click
- No interference with Twitter/Discord
- Looks better than $ and @ imo
[param].svelte
- Conventional
- Has an opening and closing, which is easier to read:
[one]-[two]
vs%one%-%two%
- Unsafe for URL pathname
- Safe for filenames, but not terminal link click, but I agree with @arxpoetica that it should rather be considered a terminal/IDE bug.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Advanced routing • Docs • SvelteKit
Make sure you check that the value of the rest parameter is valid, ... If the pathname doesn't match, SvelteKit will try to...
Read more >Change $layout.svelte to @layout.svelte and [param ... - GitHub
It's awkward to type src/routes/$layout.svelte on the command line — you get to the $ and either have to reach for the backslash,...
Read more >Loading data in layout and stuff in SvelteKit - YouTube
Loading data in layout and stuff in SvelteKit. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >Build a single-page application in Svelte with svelte-spa-router
npx degit sveltejs/template svelte-spa-router-app ... components/NotFound.svelte"; export let params = {}; let article; blogs.
Read more >SvelteKit Path Based Navigation - JumpWire
queryParam =queryValue , and can be extended to include subpages. ... The site uses a standard SvelteKit src/routes/+layout.svelte for each ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Or you could use backslash-escaping and write
touch \$layout.svelte
, that works too.ehm is that a problem to put the filename in singlequotes?