Meta Tags does not appear in View Source Code - Facebook Crawler issue - SEO #14277
-
I have integrated the meta tags which are fetched dynamically via an API call. Here is my component structure - pages/index.js
|
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 36 replies
-
If it's viable to generate this page at build time, use getStaticPaths and getStaticProps, if not use getServerSideProps, it's discouraged to use getInitalProps. https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation |
Beta Was this translation helpful? Give feedback.
-
This should definitely work, here an example https://github.com/enricoschaaf/meta-tags, https://meta-tags-58qlw6h98.vercel.app. And to answer your question, depending where you host your application you can set up a build hook with your cms, so whenever you change something in your CMS it will trigger a new build. And if your getStaticPaths has a fallback it will also try to generate routes at run time of they havent been rendered at build time. |
Beta Was this translation helpful? Give feedback.
-
Can i inject the Dynamic tags inside the _document.js directly for each page ?? Have any example for that? |
Beta Was this translation helpful? Give feedback.
-
I have my _document.js where I tried adding the meta tags and that started working. Here is my code-
|
Beta Was this translation helpful? Give feedback.
-
I don't know what's going under the hood, but removing the tag resolves this for me. I just put my meta tags without nesting them in Head, and it worked. |
Beta Was this translation helpful? Give feedback.
-
https://stackoverflow.com/questions/62064804/view-page-source-does-not-show-page-in-nextjs/74078879#74078879 check this please .I managed to handle those So here is answer https://stackoverflow.com/questions/62064804/view-page-source-does-not-show-page-in-nextjs/74078879#74078879 |
Beta Was this translation helpful? Give feedback.
-
I think then this should be fine
…On Sat, 15 Oct 2022, 16:43 Elgun Ezmemmedov, ***@***.***> wrote:
https://stackoverflow.com/questions/62064804/view-page-source-does-not-show-page-in-nextjs/74078879#74078879
check this please .I managed to handle those So here is answer
https://stackoverflow.com/questions/62064804/view-page-source-does-not-show-page-in-nextjs/74078879#74078879
—
Reply to this email directly, view it on GitHub
<#14277 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHKWYOCGLGKK22SFZ55S4LWDKGVLANCNFSM4OAY3MKQ>
.
You are receiving this because you were mentioned.Message ID: <vercel/next
.***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I just now faced a similar issue on one of my project, where the data is loaded on client side ...
so the main issue here is the useeffect which will function only on the client side.. as well the my && condition check on for the transition . The fix i could think of is that instead of && , toggling the opacity from 0 1 and vice-versa could be the right fix.. anyways the shortanswer is ,check if you are conditionally rendering your content which trigger after a useeffect |
Beta Was this translation helpful? Give feedback.
-
i'm facing the same issue `
|
Beta Was this translation helpful? Give feedback.
This should definitely work, here an example https://github.com/enricoschaaf/meta-tags, https://meta-tags-58qlw6h98.vercel.app. And to answer your question, depending where you host your application you can set up a build hook with your cms, so whenever you change something in your CMS it will trigger a new build. And if your getStaticPaths has a fallback it will also try to generate routes at run time of they havent been rendered at build time.