No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    SPA and Meta plugin deploy on Netlify

    Help
    2
    4
    327
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gvorster
      gvorster last edited by gvorster

      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 with

      meta() {
        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

      gvorster R 2 Replies Last reply Reply Quote 0
      • gvorster
        gvorster @gvorster last edited by gvorster

        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,

        1 Reply Last reply Reply Quote 0
        • R
          robin.x85 @gvorster last edited by

          @gvorster said in SPA and Meta plugin deploy on Netlify:

          see these tags when I

          where did you put _redirects file inside src ?

          1 Reply Last reply Reply Quote 0
          • gvorster
            gvorster last edited by

            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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post