From 7385fe9e2ae17458db226802e18a6f2e19e807d4 Mon Sep 17 00:00:00 2001 From: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com> Date: Tue, 10 Jun 2025 19:45:19 -0300 Subject: [PATCH] docs: document configure opengraph image (#706) * [Docs] document using og:image * Make example title page match others * clarify wording --- exampleSite/content/docs/guide/configuration.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/exampleSite/content/docs/guide/configuration.md b/exampleSite/content/docs/guide/configuration.md index 32d7b77..4530351 100644 --- a/exampleSite/content/docs/guide/configuration.md +++ b/exampleSite/content/docs/guide/configuration.md @@ -319,3 +319,18 @@ To exclude an entire directory, use the [`cascade`](https://gohugo.io/configurat > To block search crawlers, you can make a [`robots.txt` template](https://gohugo.io/templates/robots/). > However, `robots.txt` instructions do not necessarily keep a page out of Google search results. +### Open Graph + +To add [Open Graph](https://ogp.me/) metadata to a page, add values in the frontmatter params. + +As a page can have multiple `image` and `video` tags, place their values in an array. +Other Open Graph properties can have only one value. +For example, this page has an `og:image` tag (which configures an image to preview on social shares) and an `og:audio` tag. + +```yaml {filename="content/docs/guide/configuration.md"} +title: "Configuration" +params: + images: + - "/img/config-image.jpg" + audio: "config-talk.mp3" +```