hugo-theme-contentful/exampleSite/content/en/recipes/open-graph-protocol.adoc
Gabriel Arazas e2dbaf5d25 Add example site
Still the same demo to be deployed, just on a different location than a
separate branch this time.
2022-05-13 18:13:56 +08:00

1.1 KiB
Raw Blame History


title: "Open graph protocol" date: 2020-10-20T20:35:39+08:00

categories: - "recipe" tags: - "seo" - "social media" ---

Open graph protocol

John Doe <johndoe@example.com> 2020-10-20 20:35:39 +0800 :stem: latexmath

Next up, were implementing Open Graph protocol for our webpages. Commonly used for making suitable format when sharing the content on certain sites like Facebook. (Be sure to copy the head partial first in your own layout folder.)

Similar to Twitter cards, Hugo has an internal template for this. Simply add {{- template "_internal/opengraph.html" . -}} somewhere in your own copy. (For reference, heres the source code for the internal template.)

If you want more control and customized version of the output, I recommend to copy the internal template and create a partial (e.g., layouts/partials/opengraph.html) and modify it.