Home

Issue: 1928

meta data for social media not working in SPA

[issue link]

I have finished writing my application, but i am running into problems with meta data for social media sharing. Since all my page data is asynchroniously loaded via JSON file, Facebook has a hard time loaded that information. Is my only option to go the SSR way rather than a classic SPA?

I have attached a typical way that i update the meta data:

  async asyncData (context) {
    let { data } = await axios.get('/data/about.json')
    return { content: data }
  },
  head () {
    return initMetaData(this.content.seoMetaTags)
  }

The function initMetaData basically returns the meta information which is loaded.

This question is available on Nuxt.js community (#c1720)