How to use the Open Graph Protocol for your website

Comment on Mastodon

Introduction

Today I made a small change to my blog, I added some more HTML metadata for the Open Graph protocol.

Basically, when you share an url in most social networks or instant messaging, when some Open Graph headers are present the software will display you the website name, the page title, a logo and some other information. Without that, only the link will be displayed.

Implementation

You need to add a few tags to your HTML pages in the "head" tag.

There are more metadata than this but it was enough for my blog.

Open Graph Protocol website

Proxied content from gemini://perso.pw/blog/articles/opengraph.gmi (external content)

Gemini request details:

Original URL
gemini://perso.pw/blog/articles/opengraph.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.