Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Open Graph meta tags #78

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nirutthyu
Copy link

added image property in the themeConfig section of docusaurus.config.js for og image feature

Copy link

netlify bot commented Oct 26, 2024

Deploy Preview for react-play-docs ready!

Name Link
🔨 Latest commit 9fdca2d
🔍 Latest deploy log https://app.netlify.com/sites/react-play-docs/deploys/671da7abe961510008eb4412
😎 Deploy Preview https://deploy-preview-78--react-play-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Sachin-chaurasiya
Copy link
Member

Thanks for the PR @nirutthyu , can you please add the screenshot how the preview is looking when we share the doc link on any social platforms?

@nirutthyu
Copy link
Author

ya sure,
og feature

Copy link
Author

@nirutthyu nirutthyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the metadata config object along with image and description does not render the og:image and og:description properly, can you help me out ?

@Sachin-chaurasiya
Copy link
Member

adding the metadata config object along with image and description does not render the og:image and og:description properly, can you help me out ?

Hello @nirutthyu, I apologize for the delayed response. Could you please share more information about what you added to the metadata config? Additionally, could you review the document at https://docusaurus.io/docs?

@nirutthyu
Copy link
Author

@Sachin-chaurasiya as requested i tried adding the og image under
metadata:[
{ property: 'og:image', content: 'img/banner.png' },
{ name: 'description', content: 'ReactPlay is a platform for learning and building React projects' },
{ property: 'og:description', content: 'ReactPlay is a platform for learning and building React projects' },
]
and I can see the description still being rendered as banner while it is being set to a custom description in the config and the og:image is being rendered in the meta tag but not visible on testing.
Screenshot 2024-11-08 at 1 10 01 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants