archweb icon indicating copy to clipboard operation
archweb copied to clipboard

Add Open Graph image support for better social media sharing

Open nihalxkumar opened this issue 2 months ago • 2 comments

Adds Open Graph image support to archweb to improve link previews on social platforms.

  • Add og-image.png to sitestatic/logos/
  • Update base.html template to include Open Graph meta tags

Ref: https://bbs.archlinux.org/viewtopic.php?pid=2268223#p2268223

nihalxkumar avatar Oct 18 '25 22:10 nihalxkumar

Never heard of Open Graph before, who uses this? And do you have a link to the spec?

jelly avatar Oct 19 '25 12:10 jelly

Never heard of Open Graph before, who uses this? And do you have a link to the spec?

@jelly, Open Graph is a web standard to have an image along the link when shared on social media.

with-and-without-og

As things are presently, it doesn't even show a grey box.

With this PR, The image and description will work on all major social platforms like: X, Mastodon, GitHub, Discord, Whatsapp, Signal etc

Used by mostly all major websites, including linux distributions like Ubuntu

Live example from Ubuntu: https://www.opengraph.xyz/url/https%3A%2F%2Fubuntu.com

spec: https://ogp.me/

nihalxkumar avatar Oct 19 '25 12:10 nihalxkumar