From 675f1f178142521df53ba190f82b36b8a41ec7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Tue, 10 Oct 2023 22:32:05 +0200 Subject: [PATCH] theme: add social media meta information #683 --- exampleSite/content/basics/configuration/_index.en.md | 4 ++++ exampleSite/content/basics/migration/_index.en.md | 2 ++ layouts/partials/meta.html | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/basics/configuration/_index.en.md b/exampleSite/content/basics/configuration/_index.en.md index 6e8020d727..b30e297b12 100644 --- a/exampleSite/content/basics/configuration/_index.en.md +++ b/exampleSite/content/basics/configuration/_index.en.md @@ -234,3 +234,7 @@ landingPageName = " 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. diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index bcd1a33035..c2d30d4a6b 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -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} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index cffe51cdcd..c4c9525859 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -16,4 +16,6 @@ {{- with .Site.Params.author }} - {{- end }} \ No newline at end of file + {{- end }} + {{- template "_internal/opengraph.html" . }} + {{- template "_internal/twitter_cards.html" . }} \ No newline at end of file