updates open graph data

This commit is contained in:
Drew
2025-04-25 22:32:06 -06:00
parent 451e860697
commit 18c2c898aa
4 changed files with 35 additions and 30 deletions

View File

@ -15,7 +15,7 @@
{{ end }}
<!-- Basic SEO -->
<title>{{ $title }}</title>
<title>{{ $title }}{{ if .Params.narrator }} - {{ .Site.Title }}{{ end }}</title>
{{/* Generate description from summary, description, or default site description */}}
{{ $description := "" }}
@ -36,52 +36,47 @@
{{ end }}
<!-- Open Graph / Facebook -->
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:title" content="{{ $title }}" />
<meta property="og:description" content="{{ $description }}" />
{{ with .Params.images | default .Site.Params.images }}
<meta property="og:image" content="{{ index . 0 | absURL }}" />
{{ end }}
{{ with .Site.Params.facebookAppID }}
<meta property="fb:app_id" content="{{ . }}" />
{{ with .Params.ogImage | default .Site.Params.openGraphImage }}
<meta property="og:image" content="{{ . | absURL }}" />
{{ end }}
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="{{ $title }}" />
<meta name="twitter:description" content="{{ $description }}" />
{{ with .Params.images }}
<meta name="twitter:image" content="{{ index . 0 | absURL }}" />
{{ with .Params.ogImage | default .Site.Params.openGraphImage }}
<meta name="twitter:image" content="{{ . | absURL }}" />
{{ end }}
<!-- Article Specific -->
{{ if and .IsPage (eq .Type "articles") }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}" />
<meta property="article:section" content="Oral History" />
{{ with .Params.topics }}
{{ range . }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
{{ end }}
{{/* Author information using standard meta topics instead of article:author */}}
{{ with .Params.narrator }}
<meta name="author" content="{{ . }}" />
{{ end }}
{{ with .Params.facilitator }}
<meta name="interviewer" content="{{ . }}" />
{{ end }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}" />
<meta property="article:section" content="Oral History" />
{{ with .Params.topics }}
{{ range . }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
{{ end }}
{{/* Author information using standard meta topics instead of article:author */}}
{{ with .Params.narrator }}
<meta name="author" content="{{ . }}" />
{{ end }}
{{ with .Params.facilitator }}
<meta name="interviewer" content="{{ . }}" />
{{ end }}
{{ end }}
<!-- Canonical URL -->
<link rel="canonical" href="{{ .Permalink }}" />
<!-- CSS Variables and Styles -->
{{ partial "css-variables.html" . }}
<!-- CSS Styles -->
{{ partial "css.html" . }}
</head>
<body class="">