Reputation: 95
After all day following the google rabbit hole, I’m still wondering about google/bing/etc being able to crawl svelte apps. I want to convert my personal portfolio to svelte, which will be a SPA. If I add tags for the header data on the svelte SPA, will google pick it up, or do I need ssr for google to see the rendered page?
Upvotes: 1
Views: 744
Reputation: 135
Be aware of using svelte:head
for your base meta stuff. Things like open graph images or twitter cards will not work this way! This is just useful if you need to inject something to the head on mount, but not safe if you have to deal with SEO.
Upvotes: 1
Reputation: 112777
Google crawlers will most likely run your JavaScript so that the title etc. inside <svelte:head>
is picked up, but Bing and others will not.
If you go with Sapper you can use sapper export
on your site to get a pre-rendered html/svelte hybrid which will solve your issue.
Upvotes: 1