hugo-theme-more-contentful/exampleSite/content/en/recipes/open-graph-protocol.adoc
Gabriel Arazas 2f06fd7861 Initial release
All of the changes should be documented in the changelog.
2020-11-03 00:55:18 +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.