Skip to content

Commit 3296d4b

Browse files
MattDodsonEnglishimfing
authored andcommitted
docs: document configure opengraph image (#706)
* [Docs] document using og:image * Make example title page match others * clarify wording
1 parent 6c9f2c5 commit 3296d4b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

exampleSite/content/docs/guide/configuration.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,18 @@ To exclude an entire directory, use the [`cascade`](https://gohugo.io/configurat
319319
> To block search crawlers, you can make a [`robots.txt` template](https://gohugo.io/templates/robots/).
320320
> However, `robots.txt` instructions do not necessarily keep a page out of Google search results.
321321

322+
### Open Graph
323+
324+
To add [Open Graph](https://ogp.me/) metadata to a page, add values in the frontmatter params.
325+
326+
As a page can have multiple `image` and `video` tags, place their values in an array.
327+
Other Open Graph properties can have only one value.
328+
For example, this page has an `og:image` tag (which configures an image to preview on social shares) and an `og:audio` tag.
329+
330+
```yaml {filename="content/docs/guide/configuration.md"}
331+
title: "Configuration"
332+
params:
333+
images:
334+
- "/img/config-image.jpg"
335+
audio: "config-talk.mp3"
336+
```

0 commit comments

Comments
 (0)