hugo-profile icon indicating copy to clipboard operation
hugo-profile copied to clipboard

Add Open Graph and Twitter Card meta tags to improve social media sharing

Open Delvis opened this issue 1 year ago • 2 comments

This commit adds Open Graph and Twitter Card meta tags to the <head> section of the baseof.html file. These tags enhance the display of website content when shared on social media platforms like Facebook and Twitter.

Changes made:

  • Added og:image, og:title, og:description, og:url, og:type, and og:site_name for Open Graph.
  • Added twitter:card, twitter:title, twitter:description, and optional twitter:image for Twitter Card.

The values for these tags are dynamically populated based on the content of the page. Additionally, fb:app_id is recommended but can be added separately as needed.

This enhancement aims to provide a better visual representation when sharing pages from the website on various social networks.

Delvis avatar Jan 11 '24 12:01 Delvis

These are already integrated. Refer https://github.com/gurusabarish/hugo-profile/blob/master/layouts/partials/head.html

gurusabarish avatar Mar 09 '24 12:03 gurusabarish

this pr can be closed refer to https://gohugo.io/templates/embedded/#open-graph for how to add the tags

abe-101 avatar Apr 18 '24 02:04 abe-101