theme: add social media meta information #683

This commit is contained in:
Sören Weber 2023-10-10 22:32:05 +02:00
parent b600ec3002
commit 675f1f1781
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 9 additions and 1 deletions

View file

@ -234,3 +234,7 @@ landingPageName = "<i class='fas fa-home'></i> Home"
The home button is going to look like this:
![Default Home Button](home_button_defaults.png?width=18.75rem)
## Social Media Meta Tags
You can add social media meta tags for the [Open Graph](https://gohugo.io/templates/internal/#open-graph) and [Twitter Cards](https://gohugo.io/templates/internal/#twitter-cards) to your site. These are configured as mentioned in the Hugo docs.

View file

@ -26,6 +26,8 @@ This document shows you what's new in the latest release. For a detailed list of
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The theme now provides a mechanism to load further JavaScript dependencies defined by you. This comes in handy if you want to add your own shortcodes that require additional JavaScript code to be loaded. [See the docs]({{% relref "basics/customization#own-shortcodes-with-javascript-dependencies" %}}).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release adds social media meta tags provided by Hugo for the [Open Graph](https://gohugo.io/templates/internal/#open-graph) and [Twitter Cards](https://gohugo.io/templates/internal/#twitter-cards) to your site.
---
## 5.22.0 (2023-10-02) {#5220}

View file

@ -16,4 +16,6 @@
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{- with .Site.Params.author }}
<meta name="author" content="{{ . }}">
{{- end }}
{{- end }}
{{- template "_internal/opengraph.html" . }}
{{- template "_internal/twitter_cards.html" . }}