This commit is contained in:
a 2024-02-27 02:40:59 -06:00
parent cc40a43b00
commit c446e37bdc
2 changed files with 19 additions and 17 deletions

View file

@ -1,6 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{.Site.Language.Lang }}" xml:lang="{{.Site.Language.Lang }}"> <html
<head> lang="{{.Site.Language.Lang }}"
xml:lang="{{.Site.Language.Lang }}"
prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#"
>
<head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

View file

@ -14,19 +14,19 @@
{{- $name = or .Params.name .Site.Title }} {{- $name = or .Params.name .Site.Title }}
{{- end }} {{- end }}
{{- with $name }} {{- with $name }}
<title itemprop="name">{{ . }}</title> <title>{{ . }}</title>
<meta property="og:title" name="twitter:title" content="{{ . }}" /> <meta property="og:title" name="twitter:title" itemprop="name" content="{{ . }}" />
{{- end -}} {{- end -}}
{{/*=== description ===*/}} {{/*=== description ===*/}}
{{- with or .Description .Summary .Site.Params.description }} {{- with or .Description .Summary .Site.Params.description }}
<meta name="description" itemprop="description" property="og:description" content="{{ . }}"> <meta name="description" itemprop="description" property="og:description" content="{{ . }}" />
<meta name="twitter:description" content="{{ . }}" /> <meta name="twitter:description" content="{{ . }}" />
{{- end }} {{- end }}
{{ "<!-- url -->" | safeHTML }} {{ "<!-- url -->" | safeHTML }}
{{- with .Permalink | absURL}} {{- with .Permalink | absURL}}
<base href="{{ . }}"> <base href="{{ . }}" />
<link rel="canonical" href="{{ or $.Params.canonical . }}"/> <link rel="canonical" href="{{ or $.Params.canonical . }}" />
<meta name="url" property="og:url" itemprop="url" content="{{ . }}" /> <meta name="url" property="og:url" itemprop="url" content="{{ . }}" />
<meta name="twitter:url" content="{{ . }}" /> <meta name="twitter:url" content="{{ . }}" />
{{- end -}} {{- end -}}
@ -54,20 +54,17 @@
{{/*=== author ===*/}} {{/*=== author ===*/}}
{{ with or .Params.author .Site.Params.author -}} {{ with or .Params.author .Site.Params.author -}}
{{ "<!-- author -->" | safeHTML }} {{ "<!-- author -->" | safeHTML }}
<meta property="article:publisher" content="{{ . }}" /> <meta name="author" property="article:author" content="{{ . }}" />
<meta property="og:article:author" content="{{ . }}" />
<meta property="article:author" content="{{ . }}" />
<meta name="author" content="{{ . }}" />
{{- end -}} {{- end -}}
<meta property="article:publisher" content="{{ .Site.BaseURL }}" />
{{/*=== published and updated ===*/}} {{/*=== published and updated ===*/}}
{{- "<!-- time -->" | safeHTML }} {{- "<!-- time -->" | safeHTML }}
{{ with .Date -}} {{ with .Date -}}
<meta property="og:article:published_time" content={{ .Format "2006-01-02T03:04:05Z" | safeHTML }} /> <meta property="article:published_time" itemprop="datePublished" content={{ .Format "2006-01-02T03:04:05Z" | safeHTML }} />
<meta property="article:published_time" content={{ .Format "2006-01-02T03:04:05Z" | safeHTML }} />
{{ end -}} {{ end -}}
{{ with .Lastmod -}} {{ with .Lastmod -}}
<meta property="og:updated_time" content={{ .Format "2006-01-02T03:04:05Z" | safeHTML }} /> <meta property="article:modified_time" itemprop="dateModified" content={{ .Format "2006-01-02T03:04:05Z" | safeHTML }} />
{{ end -}} {{ end -}}
{{/*=== section and keywords ===*/}} {{/*=== section and keywords ===*/}}
@ -76,12 +73,13 @@
<meta property="article:section" content="{{ . }}" /> <meta property="article:section" content="{{ . }}" />
{{- end -}} {{- end -}}
{{- with .Params.tags }} {{- with .Params.tags }}
<meta name="keywords" content='{{ delimit . " "}}'> <meta property="article:tag" name="keywords" content='{{ delimit . " "}}' />
{{- end -}} {{- end -}}
{{- if isset .Params "date" }} {{- if isset .Params "date" }}
{{ "<!-- article metadata -->" | safeHTML }} {{ "<!-- article metadata -->" | safeHTML }}
<meta property="og:type" content="article" /> <meta property="og:type" content="article" />
<meta itemprop="wordCount" content="{{ .WordCount }}" />
<script defer type="application/ld+json"> <script defer type="application/ld+json">
{ {
"@context": "http://schema.org", "@context": "http://schema.org",
@ -130,9 +128,9 @@
{{/* auxiliary info */}} {{/* auxiliary info */}}
{{ "<!-- site presentation -->" | safeHTML }} {{ "<!-- site presentation -->" | safeHTML }}
{{ with $icon }} {{ with $icon }}
<link rel="shortcut icon" href='{{ .Permalink }}' sizes="{{.Width}}x{{.Height}}"> <link rel="shortcut icon" href='{{ .Permalink }}' sizes="{{.Width}}x{{.Height}}" />
{{- else -}} {{- else -}}
<link rel="shortcut icon" href='{{ $staticIcon }}' sizes="512x512"> <link rel="shortcut icon" href='{{ $staticIcon }}' sizes="512x512" />
{{- end }} {{- end }}
<meta name="theme-color" content="#ffffff" /> <meta name="theme-color" content="#ffffff" />
<meta name="msapplication-TileColor" content="#ffffff" /> <meta name="msapplication-TileColor" content="#ffffff" />