EvanAgee / vuejs-wordpress-theme-starter

A WordPress theme with the guts ripped out and replaced with Vue.
https://vuewp.com/
1.6k stars 281 forks source link

SEO impact? #13

Closed jonny-harte closed 6 years ago

jonny-harte commented 6 years ago

Hi,

This looks great! Can't wait to try it out. Just wondering about SEO though. If we installed Yoast SEO for instance would this be enough as I assume the meta tags it adds to the head would still work as normal if every URL loads the index.php?

EvanAgee commented 6 years ago

Hey @hartey11 you're right to bring up this concern, but it's outside the scope of this project. It would indeed be very important for anyone building a theme on top of this project to integrate Yoast's output into the template.

I would welcome a PR that handles outputting Yoast's generated titles/meta into the theme but I'm concerned it would push this project into being a little more opinionated than I was originally intending.

Thanks so much for bringing this up!

raisiqueira commented 6 years ago

@hartey11 @EvanAgee We can use the vue-meta to generate the meta tags, and fetch data from WP-API.

Example running in production:

captura de tela 2018-01-15 as 16 54 19

and for keywords:

captura de tela 2018-01-15 as 16 56 45

EvanAgee commented 6 years ago

@raisiqueira have you been able to get this to work with Facebook's Open Graph debugger? My understanding is that vue-meta (or generally altering the meta tags on the front-end) won't work because the crawlers won't wait for the scripts to execute.

giekaton commented 5 years ago

vue-meta doesn't work for facebook/twitter, it needs server side rendering or at least pre-rendering.

In the case of this paticular wp-vue repo, I think that you need to provide meta tags with wp, e.g. using Yoast plugin. Then fb will fetch these tags from php.

And for the client side you can use 'vue-meta' plugin, or do it without the plugin, like explained here: https://alligator.io/vuejs/vue-router-modify-head/

giekaton commented 5 years ago

Just tested this and can confirm that it works.