Omnislash
Redirect all routes to /
Hello,
I would like to redirect all potential routes to my index page ('/')
I tried this in nuxt.config.ts :
But it looks like it's giving me an infinite loop
I didn't try with a middleware but... it seems more proper and elegant to do it in the routeRules ?
Thanks 🙂
5 replies
NuxtImg, custom query parameter on source
Hello,
I allow my user to customize their logo on their page.
However, since I always register it under the name "logo", the NuxtImg cache doesn't refresh and doesn't show the new logo
The solution should be simple, adding the update timestamp as a query parameter of the source.... but the source is already customized with info like width, fit, aspect ratio....
So... how can I add a custom query parameter to my source ? Maybe there is actually a simpler solution ?
Thanks ^^
5 replies
NuxtUI Input placeholder/italic
Hello 🙂
I use NuxtUI, I would like my inputs to have their placeholder in italic but not the entered text.
Here is my app.config.ts :
Right now, it says in italic the whole time.
I tried :
- base: '!not-italic' -> The placeholder is not in italic either anymore
- Adding not-italic in the white.outline -> No change, using important or not
An idea ^^" ?
Thanks
6 replies
Nuxt Context error despite onNuxtReady
Hello
I have the following error :
Uncaught Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at
https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables
.
Problem is, the error is from this code (in a composable) :
Isn't the goal of onNuxtReady to avoid this problem ? what am I doing wrong ?
Thanks 🙂6 replies
eslint end-tag-with-attributes
Hello 🙂
Pretty simple (I hope ^^")
I installed eslint automatically this way, with stylistic without prettier :
https://eslint.nuxt.com/packages/module
So far so good 🙂
But then, this is considered an error :
<MyComponent end>
How can I authorize specific attributes, or even better specific attributes for specific components ?
I feel like it should be possible since those work fine :
Thanks 🙂
6 replies
useServerSeoMeta ref/reactive vs await and one time rendering
Hello :),
I read here and there (sorry, not very helpful ^^") that I should give directly the ref or computed to useHead/useSeoMeta/useServerSeoMeta so I'm assured the value will be updated to the right one.
That being said, especially with useServerSeoMeta, not only it's server side but for SEO but even more og/twitter the first render matter AND it awaits on the useFetch to have the right value.
What is the point in making it reactive since it HAS to have the right value right away anyway ?
10 replies
Separate SEO and user rendering
Hello :),
If I'm not mistaken, it is required to use await with useFetch (or useAsyncData) to ensure to have the best SEO possible or even just for the Social Media sharing to work properly.
So, dumb question.... to have a snappy result, is it possible to render a different page for Google/Social Network and for the users ?
The goal would be to have something fully server-side for SEO and something snappier for the users 🙂
Thanks ^^
6 replies
useFetch, await, SEO and og
Hello all 🙂
I'm a bit concerned about some result I have using useFetch and useSeoMeta (or useServerSeoMeta), so I just want to confirm some stuff 🙂
Case 1 : useFetch without await and use(Server)SeoMeta
In the Google search console, it looks like the description/ogdescription is correct 100% of the time.
However, it's not working properly when sharing it over Discord, LinkedIn or else
Case 2 : useFetch WITH await and use(Server)SeoMeta
Now it works properly everywhere
I don't really understand how it appears replaced for Google while not working on social networks. I guess Google render it twice or something but Social Network don't.
Question
Can I be confident that useFetch without await will be fully seo-optimized and the issue is just with Social Networks ?
Or should I always use useFetch WITH await when I'm aiming for the best possible SEO ?
Thanks ^^
8 replies
Hydration loading
Hello 🙂
I understand that when the server is done loading, you can display somethign while the client is downloading the content using either <ClientOnly> or OnMounted()
Is it possible to display something while the server is loading ? For exemple, to exaggerate it, if I put a 10 seconds waiting for an endpoint to answer, I will have to wait for 10s to display anything no matter what ?
I would say yes since wherever I check, documentation including, you have to await the useFetch (or useAsyncData) but... who knows, I might have missed something big ^^"
Thanks 🙂
3 replies
Nuxt UI Theming : Nested primary color
Hello 🙂
If I crated this in my tailwind config :
And this in my nuxt config :
It works fine
But if I write main this way :
It looks like this doesn't work in the nuxt conf :
Is there a way to nest my colors before making it the primary in nuxt ?
Thanks 🙂
1 replies
UForm schema array
Hello,
I need to create an extensible form for my project
I'm using zod, which looks like this (no problem on that side)
I then go over the array to display the form :
The validation itself works but.... I can't seem to find how to name the UFormGroup for the errors to be printed within the form.
Any idea ^^" ?
Thanks
1 replies
Deploy without Nitro
Hello,
I'm using Nuxt only as a front, coding the back on Adonis.
I disabled the SSR, since you need to be connected to see any part of my service there is no SEO involved (and I'm actually here to minimize the workload on the server ends)
I don't seem to find in the documentation or from a trusted source how to disable Nitro and deploy without it.
Is there any link about it please ^^ ?
Thanks
9 replies
useFetch vs $fetch
Hello,
First of all, I understand that :
- useFetch = useAsyncData + $fetch
- $fetch is pre-hydration (if awaited, even resolved pre-hydration)
That being said, with SSR fully disabled, is there any perk using useFetch instead of $fetch ?
SSR is disabled for me because :
- Nothing will be publicly accessible anyway, no SEO needed
- For the type of project, it's more important to reduce the server workload and the client will be ok to "wait the extra time"
Thanks 🙂
3 replies