Skip to content

Commit

Permalink
Add support for OpenGraph metadata (EmielH#69)
Browse files Browse the repository at this point in the history
* Add support for OpenGraph metadata

* Mention OpenGraph support in README.md
  • Loading branch information
bragefuglseth authored Aug 22, 2024
1 parent 5acba3b commit 1184888
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ To enable it, add the `googleAnalytics` tag to your `config.toml`. It will be ad
googleAnalytics = "UA-133700000-0"
```

### OpenGraph

Tale integrates Hugo's embedded OpenGraph template, enabling rich social previews for your page when it's shared as a link. To see how to configure it, consult the [Hugo OpenGraph template documentation](https://gohugo.io/templates/embedded/#configure-open-graph).

### Custom summaries

Tale allows for writing the summary of your posts manually by setting the `summary` variable in the page frontmatter. If this variable is not set, the summary that Hugo automatically generates will be used.
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<head>
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
<!--- OpenGraph metadata -->
{{ template "_internal/opengraph.html" . }}

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{- if .IsHome }}
Expand Down

0 comments on commit 1184888

Please sign in to comment.