Open fabianmossberg opened 5 days ago
The plan is for <SEO>
to be reusable across multiple components/pages. The title element is like a buffer so that when reusing SEO for different elements, the and tag isn't duplicated multiple times with it.
I attempted to add javascript checks to have this more streamlined but that broke either ssr or prerendered pages, cant remember which to be honest. I also tried a bunch of other ideas but nothing worked without breaking something else. I found using this modular approach to be best for now.
If you have any ideas to fix the duplication issue I'd love to give them a shot.
Is there any good reson why some things are only shown if there is a title set?
https://github.com/TheDahoom/Sveltekit-seo/blob/bcc9433a15e5a93f29ee8f47cee1757c9f22886f/SEO.svelte#L28-L36
To me, it would make more sense if it looked like this: