Replies: 1 comment 1 reply
-
It seems this issue is only limited to SPA pre-rendering. I have Netlify setup for my site and it's working fine without any modifications. OG tags are rendering fine too. May I ask why are you pre-rendering your site? It's not needed with Hugo. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you use Netlify, there's a weird problem: the open graph tags disappears when rendered.
When running
hugo server
it all works, but removed when Netlify renders your site. You can test this using FB Sharing Debugger.The (temp) solution is to remove
<!DOCTYPE html>
frombaseof.html
Original link: https://stackoverflow.com/questions/55952223/og-tags-not-working-with-react-helmet-and-netlify
A secondary somewhat related is that OG tags should be as high to the top as possible. Some services, such as WhatsApp, Facebook and Google only download the first N bytes of your html - so if you have a ton of stuff before those meta tags - it could be “missing” the parts that it needs to pre-render correctly.
Original link: https://answers.netlify.com/t/support-guide-understanding-and-debugging-prerendering/150
Hope this helps and if you know a better solution than any mentioned, please reply!
Beta Was this translation helpful? Give feedback.
All reactions