Closed jonny-harte closed 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!
@hartey11 @EvanAgee We can use the vue-meta to generate the meta tags, and fetch data from WP-API.
Example running in production:
and for keywords:
@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.
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/
Just tested this and can confirm that it works.
vue-head
for the client side. FB doesn't see this metadata.Yoast SEO
plugin for Facebook, Twitter. Works great.
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?