{{- /*
partials/meta/og.html — Open Graph + Twitter Card meta tags
og:title Page title (site title for home page)
og:description .Description → .Site.Params.description → ""
og:url .Permalink
og:type "website" (home) | "article" (everything else)
og:site_name .Site.Title
og:image .Params.image → .Site.Params.og_image → absent
twitter:card "summary_large_image" when image present, else "summary"
twitter:site .Site.Params.twitter (optional @handle)
Configure in hugo.toml:
[params]
og_image = "/images/og-default.png" # fallback OG image
twitter = "@yourhandle" # omit if not on Twitter/X
*/ -}}
{{- $title := cond .IsHome .Site.Title (printf "%s · %s" .Title .Site.Title) -}}
{{- $desc := or .Description .Site.Params.description "" -}}
{{- $image := or .Params.image .Site.Params.og_image "" -}}
{{- $type := cond .IsHome "website" "article" -}}
{{- with $image }}
{{- end }}
{{- /* Twitter / X Card */}}
{{- with $image }}
{{- end }}
{{- with .Site.Params.twitter }}
{{- end }}