mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
Merge pull request #2101 from ZhenShuo2021/feat/social-image
✨ feat: add defaultSocialImage (#1491) (#2100)
This commit is contained in:
@@ -107,6 +107,14 @@
|
||||
{{/* Social */}}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{- /* Main page always uses this; fallback elsewhere if no feature image */ -}}
|
||||
{{- /* See https://gohugo.io/templates/embedded/#open-graph */ -}}
|
||||
{{ if not ($.Resources.GetMatch "*feature*") }}
|
||||
{{ with .Site.Params.defaultSocialImage }}
|
||||
<meta name="twitter:image" content="{{ . | absURL }}" />
|
||||
<meta property="og:image" content="{{ . | absURL }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* Schema */}}
|
||||
{{ partial "schema.html" . }}
|
||||
{{/* Me */}}
|
||||
|
||||
Reference in New Issue
Block a user