Title of page not updating
So the thing is that I use SolidStart with CSR mode (w/index.html so vite-plugin-pwa detects it)
On development, Title is working.
On production, it doesn't.
It always keep the index.html title and never updates it, probably because when looking at the DevTools, I can see 2 <title> elements - the one from my index.html and the one from SolidStart.
Any work around?
8 Replies
Are you using a <title> in Solid Start? That should be a <Title> if there already is one in index.html, I suppose.
nope im using the one exported by solid-start
That's strange. Then two title tags getting rendered is definitely an error.
when removing the title tag from my index.html, it works but is it bad for SEO?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i also had some issues with meta without solid-start
with the exact same conditions, title in index.html and Title in JSX are conflicting
(reposting deleted reply ^_^) looking at the source https://github.com/solidjs/solid-meta/blob/544aacc4ebaba89832e6e6aa91fc11bafca3a0a1/src/index.tsx#L36-L40 it removes all elements with
data-sm
attribute on the client with no hydrationso I should append
data-sm
to my title element to trick solid-meta?
let me try and I'll let you know if it works! (will be on the pc soon)
It works! Closing this...