I'm watching now the Let's build a forum with Laravel and TDD series and I can see that Jeff is using Vue components to render out most of the elements from the page. Is that SEO friendly (and yes, I know that a lot of people already asked this question :)? I assume for inline-templates this should not be an issue since the html content is basically there in the page source.
I've read most of the Vue.js and SEO topics from Laracasts forum, but still not sure what the correct answer is.
I'm looking to build a forum for a community myself, and I'm really concern how search engines will index my pages if I go with the Vue components approach.
best to google that. But the answer seems to be no, it's not seo friendly, at least not without some forethought and work (server side rendering/prerendering, etc). You could always use blade for rendering the initial view, with all of your SEO goodness, and then use Vue to manipulate it after it's initially rendered. One of the downsides to javascript...
Yeah, this sounds like a good idea! Do you happen to know any sources/examples where I can check how that's implemented? Do you know if Jeff did something similar in his Vue video series? I'm pretty new to Vue honestly.
I found an article when somebody mentioned that I can use something like this:
This seems to be more useful for building a SPA Vue application. In my case I'm trying to use blade most of the time and Vue for some user interactions/actions where possible.
Okay, so I guess as soon as you're not fetching your page content via Ajax, using Vue to render some HTML should be SEO friendly. Found this note in the Vue.js Server-Side Rendering Guide:
Note that as of now, Google and Bing can index synchronous JavaScript applications just fine. Synchronous being the key word there. If your app starts with a loading spinner, then fetches content via Ajax, the crawler will not wait for you to finish. This means if you have content fetched asynchronously on pages where SEO is important, SSR might be necessary.