Skip to content

dynamic route + endpoint serves endpoint instead of page #4162

Answered by ITwrx
ITwrx asked this question in Q&A
Discussion options

You must be logged in to vote

@JSaretin With shadow endpoints, now renamed to endpoints the .svelte file is populated with the data from the same-named .js, as described in the updated/current docs. The example .svelte and .js are both named the same, and the file names are dynamic, though not at the top level directory.

My routes are fully dynamic because i'm trying to build a CMS with Sveltekit, where the admin user needs to have full control over the structure of the resulting public-facing site. For SEO, clarity, and aesthetic reasons, i can't really be putting words in their routes like category-[the-cat-you-really-wanted].svelte. Also, my .svelte files don't have load functions anymore since the change to shadow…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@ITwrx
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@JSaretin
Comment options

@ITwrx
Comment options

Answer selected by ITwrx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants