You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone,
I'm sorry to bother you but I've been stuck on a problem for several days.
I am on Vue 3 and I am using composition API to build schema org. I also use vue router for different page, so several different vue have different schema.
My problem is that when I use npm run serve I can see the org schema generated code appear but when I do npm run build and access the website the org schema code does not appear.
Here is what I see in the code when I use npm run serve:
<body><noscript><strong>We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><divid="app" data-v-app="">..................</div><!-- built files will be auto injected --><scripttype="application/ld+json">{"@context": "https://schema.org","@graph": [{"@id": "https://www.fly-serv.com/#identity","@type": "Organization","name": "Fly-Serv","url": "https://www.fly-serv.com","logo": {"@id": "https://www.fly-serv.com/#logo"},"sameAs": ["https://twitter.com/FlyServ_Hosting","https://www.facebook.com/flyservfr","https://www.instagram.com/flyserv_fr/"]},{"@id": "https://www.fly-serv.com/gmod/#product","@type": "Product","description": "Besoin d'un serveur Garry's Mod de qualité à bas prix ? Découvrez nos offres d'hébergement et de location de serveurs Gmod, DarkRP, Murder, Sandbox et plus encore ! Livraison instantanée, protection anti-DDoS, support rapide et sécurité garantie.","mpn": "serveur-gmod","name": "Serveur Gmod","sku": "serveur-gmod","aggregateRating": {"@type": "AggregateRating","ratingValue": "4.6","reviewCount": "5","ratingCount": "116"},"author": {"@type": "Organization","name": "Fly-Serv"},"brand": {"@type": "Thing","name": "Serveur Gmod"},"image": ["https://www.fly-serv.com/og-game/gmod.png"],"mainEntityOfPage": {"@id": "https://www.fly-serv.com/gmod/#webpage"},"offer": {"lowPrice": "2.99","highPrice": "22.99","priceCurrency": "EUR","offerCount": "6","availability": "InStock","url": "https://www.fly-serv.com/gmod"},"review": {"@type": "Rating","reviewRating": {"@type": "Rating","bestRating": "5","worstRating": 1,"ratingValue": "4.6"}}},{"@id": "https://www.fly-serv.com/gmod/#webpage","@type": "WebPage","description": "Besoin d'un serveur Garry's Mod de qualité à bas prix ? Découvrez nos offres d'hébergement et de location de serveurs Gmod, DarkRP, Murder, Sandbox et plus encore ! Livraison instantanée, protection anti-DDoS, support rapide et sécurité garantie.","name": "Hébergement et location de serveur Gmod - Bas prix et haute qualité | Fly-Serv","url": "https://www.fly-serv.com/gmod","about": {"@id": "https://www.fly-serv.com/#identity"},"potentialAction": [{"@type": "ReadAction","target": ["https://www.fly-serv.com/gmod"]}],"primaryImageOfPage": {"@id": "https://www.fly-serv.com/#logo"}},{"@id": "https://www.fly-serv.com/#logo","@type": "ImageObject","caption": "Fly-Serv","contentUrl": "https://www.fly-serv.com/logo.png","url": "https://www.fly-serv.com/logo.png"}]}</script></body>
This is what I get on the build version:
<body><noscript><strong>We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><divid="app" data-v-app="">..................</div></body>
I still searched with CTRL+F if the keyword "schema" appears but this is not the case so the schema is not found at the level of the build version.
I don't really understand why the serve version benefits from the org schema but not why the build version doesn't.
I would really appreciate any help on this as I can't seem to find any solutions.
Thank you in advance for your help ! :)
The text was updated successfully, but these errors were encountered:
Would you mind sharing a bit more about your app? Are you SSR'ing? It's not clear from the code you provided.
If so, how have you set up the head SSR?
Hey @harlan-zw
I don't think I use SSR, the problem probably comes from here... I'm a beginner, do you have an article or documentation that I could follow to integrate schema-org on my Vue3 project in a sustainable way and not only when I do an npm run serve?
Hey @FlorentinLedy
Would you mind sharing a bit more about your app? Are you SSR'ing? It's not clear from the code you provided.
If so, how have you set up the head SSR?
Hey @harlan-zw I don't think I use SSR, the problem probably comes from here... I'm a beginner, do you have an article or documentation that I could follow to integrate schema-org on my Vue3 project in a sustainable way and not only when I do an npm run serve?
I would like to point out that my application is a SPA and therefore is it possible to use schema org other than in SSR?
Hello everyone,
I'm sorry to bother you but I've been stuck on a problem for several days.
I am on Vue 3 and I am using composition API to build schema org. I also use vue router for different page, so several different vue have different schema.
My problem is that when I use npm run serve I can see the org schema generated code appear but when I do npm run build and access the website the org schema code does not appear.
Here is what I see in the code when I use npm run serve:
This is what I get on the build version:
I still searched with CTRL+F if the keyword "schema" appears but this is not the case so the schema is not found at the level of the build version.
Here is my vue.config.js :
Here is my main.js :
Here is an example of a vue :
And here is my App.vue :
I don't really understand why the serve version benefits from the org schema but not why the build version doesn't.
I would really appreciate any help on this as I can't seem to find any solutions.
Thank you in advance for your help ! :)
The text was updated successfully, but these errors were encountered: