Skip to content

feat: add Open Graph and Twitter Card metadata for social sharing - #60

Open
Aniket-The-TechWhiz wants to merge 2 commits into
Ayushmore1214:mainfrom
Aniket-The-TechWhiz:add-social-meta-tags
Open

feat: add Open Graph and Twitter Card metadata for social sharing#60
Aniket-The-TechWhiz wants to merge 2 commits into
Ayushmore1214:mainfrom
Aniket-The-TechWhiz:add-social-meta-tags

Conversation

@Aniket-The-TechWhiz

Copy link
Copy Markdown
Contributor

Summary

This PR adds Open Graph and Twitter Card metadata to src/index.html to improve link previews when the site is shared on platforms such as LinkedIn, X (Twitter), Slack, Discord, and WhatsApp.

Changes Made

  • Added og:title
  • Added og:description
  • Added og:type with the value website
  • Added og:url pointing to the live GitHub Pages site
  • Added twitter:card with the value summary
  • Grouped all social metadata under a descriptive comment for easier maintenance

Notes

  • Reused the existing page title and meta description to keep metadata consistent.
  • Used the production URL: https://ayushmore1214.github.io/FirstCommit/.
  • og:image was intentionally not added because a hosted image is not currently available. The issue notes that adding the text metadata alone is a complete and valuable improvement.

@Ayushmore1214

Copy link
Copy Markdown
Owner

Thanks @Aniket-The-TechWhiz. The Open Graph and Twitter Card tags themselves are correct, and skipping og:image for now is a reasonable call. Three things to sort out:

1. Missing DCO sign-off. Neither commit on this branch has a Signed-off-by: line, so the DCO check will fail. Sign off both commits:

git rebase --signoff upstream/main
git push --force-with-lease

2. This branch includes the Draft PR glossary card from #59. It looks like you branched off add-draft-pr-glossary instead of main. Once #59 is merged that overlap will disappear on its own, so easiest path: fix #59 first, then rebase this branch onto the updated main so this PR contains only the meta tags.

3. Unrelated reformatting. The existing description meta tag and the Google Fonts <link> got rewrapped onto multiple lines. Please revert those two back to their original single-line form so the diff shows only what this PR is actually adding. Keeping diffs focused makes review much faster, and it's a habit worth building.

After that this is good to go. It closes #49.

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