Lien :
https://discourse.getgrav.org/t/sharing-on-facebook/2301/4

Modification du template.

Ouvrir:

 montheme/templates/partials/base.html.twig

Ajouter :

    <meta name="og:url" property="og:url" content="https://mysite.com{{ page.url }}" />
    <meta name="og:title" property="og:title" content="{{ page.title }}" />
    <meta name="og:description" property="og:description" content="{{ page.metadata.description.content }}" />

Dans un article :

Ajouter :

metadata:
    description: "the page description"
    "og:image": "https://mysite.com/mypage/myimage.jpg"

Previous Post Next Post