I am using SvelteKit in conjunction with Prismic at the company where I work, with SvelteKit being the primary technology in our stack. As a junior developer, I'm aware that I have much to learn. Prismic integration for SvelteKit has been available for about three months, yet there are only two basic tutorial videos on YouTube. The documentation is decent, yet it sometimes lacks detailed explanations.
I'm currently facing a challenge: I'm trying to understand how to import information from a custom type into my slice. I have an 'articles' slice with its main data (
slice), but I'm struggling to import linked articles into it. So far, I haven't found any examples demonstrating how to do this in the
index.svelte file for the articles slice.
My question revolves around routing. I've used
"src/routes/+layout.server.js" to call my custom types for the navigation and footer, integrating them into my main layout. However, I'm uncertain about how to fetch articles using
const documents = await client.getAllByType('article') and link this to the
As a beginner, I hope my query doesn't come across as too naive. Given that Prismic's integration with SvelteKit is relatively new, finding comprehensive documentation or examples, especially for SvelteKit, has been challenging.