I have a Nuxt JS website with dynamic pages, and the data come from RESTful API.
When i visit the page, it show circle loading screen, and then load the content.
I build this using nuxt generate
command.
loading screen:
view source like this:
that view source shows loading indicator.
How to make it skip loading and contain result of HTML only? I am doing this for SEO purposes
my asyncData:
async asyncData({ $axios, route }) {
const response = await $axios.$get('/v1/items/' + route.params.slug)
const coverImage = response.data.images.find((e) => e.cover)
return { item: response.data, coverImage }
},
I find the solution here https://www.youtube.com/watch?v=nngsKhTb2BA
I need to have a node server running. So that my site will be generated on the server side (SSR).