mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-08-29 20:27:16 +00:00
38 lines
1.9 KiB
HTML
38 lines
1.9 KiB
HTML
{{ define "meta" }}
|
|
{{/* Title falls back to SiteName if empty — better than rendering a blank
|
|
<title> that screen readers and tab chrome handle poorly. */}}
|
|
<title>{{ or .Title .SiteName "ATCR" }}</title>
|
|
|
|
{{/* Description: omit the tag entirely when empty rather than emitting
|
|
<meta name="description" content="">, which some SEO tools flag. */}}
|
|
{{ if .Description }}<meta name="description" content="{{ .Description }}">{{ end }}
|
|
{{ if .Canonical }}<link rel="canonical" href="{{ .Canonical }}">{{ end }}
|
|
{{ if .Robots }}<meta name="robots" content="{{ .Robots }}">{{ end }}
|
|
|
|
{{/* OpenGraph */}}
|
|
<meta property="og:locale" content="{{ or .OGLocale "en_US" }}">
|
|
<meta property="og:title" content="{{ or .Title .SiteName "ATCR" }}">
|
|
{{ if .Description }}<meta property="og:description" content="{{ .Description }}">{{ end }}
|
|
<meta property="og:type" content="{{ or .OGType "website" }}">
|
|
{{ if .Canonical }}<meta property="og:url" content="{{ .Canonical }}">{{ end }}
|
|
{{ if .OGImage }}
|
|
<meta property="og:image" content="{{ .OGImage }}">
|
|
<meta property="og:image:width" content="1200">
|
|
<meta property="og:image:height" content="630">
|
|
{{ if .OGImageAlt }}<meta property="og:image:alt" content="{{ .OGImageAlt }}">{{ end }}
|
|
{{ end }}
|
|
<meta property="og:site_name" content="{{ or .SiteName "ATCR" }}">
|
|
|
|
{{/* Twitter Card */}}
|
|
<meta name="twitter:card" content="{{ or .TwitterCard "summary_large_image" }}">
|
|
<meta name="twitter:title" content="{{ or .Title .SiteName "ATCR" }}">
|
|
{{ if .Description }}<meta name="twitter:description" content="{{ .Description }}">{{ end }}
|
|
{{ if .OGImage }}<meta name="twitter:image" content="{{ .OGImage }}">{{ end }}
|
|
{{ if and .OGImage .OGImageAlt }}<meta name="twitter:image:alt" content="{{ .OGImageAlt }}">{{ end }}
|
|
|
|
{{/* JSON-LD */}}
|
|
{{ range .JSONLD }}
|
|
{{ jsonldScript . }}
|
|
{{ end }}
|
|
{{ end }}
|