dashboard or /item), and others that are 'marketing' routes that should have a different layout ( /blog or /testimonials). Perhaps you have some routes that are 'app' routes that should have one layout (e.g. In some cases, that might not be what you want. Advanced layoutsīy default, the layout hierarchy mirrors the route hierarchy. character, you may find it useful to encode these characters when creating e.g.well-known routes: src/routes/well-known/. Since TypeScript struggles with directories with a leading. (Unlike JavaScript string escaping, there's no need to use surrogate pairs to represent code points above ffff.) To learn more about Unicode encodings, consult Programming with Unicode. The format for a Unicode escape sequence is where nnnn is a valid value between 0000 and 10ffff. In other words, these are equivalent: src/routes// page.svelte Generally you won't need to as you can use the unencoded character directly, but if - for some reason - you can't have a filename with an emoji in it, for example, then you can use the escaped characters. You can also use Unicode escape sequences. You can determine the hexadecimal code for a character with JavaScript: To use these characters in your routes, you can use hexadecimal escape sequences, which have the format where nn is a hexadecimal character code:įor example, to create a /smileys/:-) route, you would create a src/routes/smileys/-/ page.svelte file. The # and % characters have special meaning in URLs, and the ( ) characters have special meaning to SvelteKit, so these also can't be used directly as part of your route. Some characters can't be used on the filesystem - / on Linux and Mac, \ / : * ? " | on Windows. resulting in this ordering, meaning that /foo-abc will invoke src/routes/foo-abc/ page.svelte, and /foo-def will invoke src/routes/foo-/ page.svelte rather than less specific routes: src/routes/foo-abc/ page.svelte In other words x/]/z is treated equivalently to x/z for the purposes of sorting
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |