diff options
author | miraikumiko <miraikumiko@disroot.org> | 2025-05-03 20:08:38 +0200 |
---|---|---|
committer | miraikumiko <miraikumiko@disroot.org> | 2025-05-03 20:08:38 +0200 |
commit | fb01daeb1e92fd81eb3b55b74a25d5bb9686352b (patch) | |
tree | 1cf638f9f869e8c13da3f5ea81f33995a98f1a2b /layouts/partials/seo_tags.html | |
parent | b4a60a014d09c7b6c64eef4a4f44502fd78307cd (diff) | |
download | hugo-bearcub-main.tar.gz hugo-bearcub-main.tar.bz2 |
Diffstat (limited to 'layouts/partials/seo_tags.html')
-rw-r--r-- | layouts/partials/seo_tags.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/partials/seo_tags.html b/layouts/partials/seo_tags.html index 058b788..07829fd 100644 --- a/layouts/partials/seo_tags.html +++ b/layouts/partials/seo_tags.html @@ -4,6 +4,19 @@ <meta name="author" content="{{ .Site.Params.Author.name }}" /> <meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" /> +<!-- Only generate social card if: --> +<!-- - generateSocialCard = true --> +<!-- - there aren't images set in frontmatter --> +<!-- - page is of .Kind "page" --> {{ if and (and (default false .Site.Params.generateSocialCard) (not (isset .Params "images"))) (eq .Kind "page") }} {{ partial "social_card.html" . }} +{{ else }} + <!-- Open Graph / Facebook --> + {{ template "_internal/opengraph.html" . }} + + <!-- Twitter --> + {{ template "_internal/twitter_cards.html" . }} + + <!-- Microdata --> + {{ template "_internal/schema.html" . }} {{ end }} |