woutercouvaras
woutercouvaras
NNuxt
Created by woutercouvaras on 4/18/2024 in #❓・help
Dynamic hostname / Nitro
In case this helps anyone else, I've ended up dropping the @nuxtjs/sitemap module in favour of simply creating my own api endpoint, and using this nodejs sitemap package to return the xml formatted doc: https://www.npmjs.com/package/sitemap
3 replies
NNuxt
Created by woutercouvaras on 4/18/2024 in #❓・help
Dynamic hostname / Nitro
Is there no one else solving problems like this? I've got one project that serves 12 sites and another project that serves 2. Today, I tried setting a custom header in my api middleware (I can see the correct host there), but my custom header still ends up beging set to localhost when I access it in the /api/__sitemap__/urls.ts file. If I can't solve this I might have to build my own solution 😦
3 replies
NNuxt
Created by zeeshansiddique_ on 3/10/2023 in #❓・help
pinia-plugin-persistedstate
I use my same set action to set it to null
3 replies
NNuxt
Created by woutercouvaras on 2/20/2023 in #❓・help
Nuxt Layers
Great, thanks! I'll take another look and posta reporoduction if I cna't figure it out
14 replies
NNuxt
Created by woutercouvaras on 2/20/2023 in #❓・help
Nuxt Layers
Just looked it up. Nope, using the default
14 replies
NNuxt
Created by woutercouvaras on 2/20/2023 in #❓・help
Nuxt Layers
I'm embarrased to say I don't even know what the srcDir prop is 😊 😂
14 replies
NNuxt
Created by woutercouvaras on 2/20/2023 in #❓・help
Nuxt Layers
Sounds very plausible for custom classes/styles, but the styles I'm using are standard tailwind styles (in this case). If you're also experiencing this issue, perhaps it's indicative of a bigger problem?
It's just super weird, seeing as atinux's example just works. Hmm...I just had a thought to check the nuxt versions. Atinux's example uses 3.2.2, I'm currently on 3.2.0. I'll upgrade and try again, but I don't hold out too much hope.
14 replies
NNuxt
Created by Kérunix on 3/8/2023 in #❓・help
Fetching related data sequentially
The direction I've been leaning in is to create a composable that takes an array of urls. In the composable, you make all your requests with an await Promise.all. You can expose similar statuses to the useFetch compsable (e.g. pending, error, data). Data can then contain an object of all your records - e.g. { posts: [...], authors: [...], comments: [...]}
13 replies
NNuxt
Created by woutercouvaras on 3/8/2023 in #❓・help
Re-usable server/api code
Hi! Thanks, that's exactly what I've done😊 I just thought I'd ask to see if there was some specific best practice. Thanks for taking the time to answer! 👏
3 replies
NNuxt
Created by woutercouvaras on 2/20/2023 in #❓・help
Nuxt Layers
Thanks for taking the time to reply Chris (don't now how I missed your reply). I actually published it as a private package on github packages because of this exact reason, but I had the same issue. I'll continue digging and post any findings here, in case it helps others.
14 replies