Created
May 23, 2018 10:12
-
-
Save AeonFr/3144f586716638fd75caf77f3c75111f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- facebook open graph & google tags (this also works for twitter) --> | |
<!-- This are usefull mostly for machines. --> | |
<meta property="og:url" content="https:{{ .Permalink }}" /> | |
<!-- es_AR means "spanish from Argentina". Not really supported, though. That's why there's a fallback --> | |
<meta property="og:locale" content="es_AR" /> | |
<meta property="og:locale:alternate" content="es_LA" /> | |
<!-- This properties are the more important: they determine how the card looks in Fb, Tw, linkedin & slack --> | |
<meta property="og:title" content="{{ .Title }}" /> | |
<meta name="description" content="{{ .Description }}"> | |
<meta property="og:description" content="{{ .Description }}" /> | |
<!-- CHOOSE ONE - http://ogp.me/#types --> | |
<meta property="og:type" content="website" /> | |
<meta property="og:type" content="product" /> | |
<meta property="og:type" content="article" /> | |
<!-- RECOMENDED IMAGE SIZE: 1200x630px --> | |
<meta property="og:image" content=""> | |
<!-- THIS IS OPTIONAL BUT RECOMMENDED --> | |
<meta propery="og:image:width" content="1200"> | |
<meta propery="og:image:height" content="630"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In PHP, it's easy to print the
og:url
by using:If you have multiple domains pointing to one website, you could even hardcode the domain name.