SPA and Meta plugin deploy on Netlify
-
Should this be working on Netlify?
I am able to deploy the dist/spa folder on Netfliy and only added a _redirects file with the content
/* /index.html 200
Everything is working except the meta tags are not visible when I view a page.
When I have a .vue file withmeta() { return { title: this.seoTitle, meta: { author: { name: "og:author", content: this.seoAuthor }, image: { name: "og:image", content: this.seoImage }, description: { name: "og:description", content: this.seoDescription } } }; },
I don’t see these tags when I view the source of a page.
I enabled prerendering setting as instructed on https://docs.netlify.com/site-deploys/post-processing/prerendering/#set-up-prerendering
-
After reading https://community.netlify.com/t/common-issue-understanding-and-debugging-prerendering/150
I tested this with a link of a page in my app and it does work!
Testing with
curl https://www.sitename.com/?_escaped_fragment_=
or open the url in the browser appended with
/?_escaped_fragment_=
Then viewing the source in the browser will display the dynamically generated meta tags,
-
@gvorster said in SPA and Meta plugin deploy on Netlify:
see these tags when I
where did you put _redirects file inside src ?
-
I copied it manually after a build to the ./dist/spa folder together with robots.txt and sitemap.xml . I don’t know how to do it automatically