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>
<html lang="{{.Site.Language.Lang }}" xml:lang="{{.Site.Language.Lang }}">
<head>
<html
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 name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

View file

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