hackertours-theme/layouts/partials/meta.html
2025-01-20 10:58:22 +01:00

29 lines
1.7 KiB
HTML

{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" {{ printf "type=%q" .MediaType.Type | safeHTMLAttr }} title="{{ .Name }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta name="view-transition" content="same-origin">
{{ if .IsHome -}}
{{ with $.Param "description" }}<meta name="description" content="{{ . }}">{{ end }}
{{ else -}}
{{ with .Description }}<meta name="description" content="{{ . }}">{{ end }}
{{ end -}}
<meta name="created" {{ printf "content=%q" (.Date.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
<meta name="modified" {{ printf "content=%q" (.Lastmod.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
{{ with .Params.author | default site.Params.author.name }}<meta name="author" content="{{ . }}">{{ end }}
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
{{ with $.Param "image" }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
{{ hugo.Generator }}
<meta name="msapplication-TileColor" content="{{ $.Param "themecolor" | default "#ffffff" }}">
<meta name="theme-color" content="{{ $.Param "themecolor" | default "#ffffff" }}">
{{ with site.Params.piwikTrackerUrl }}<link rel="dns-prefetch" href="https://{{ . }}">{{ end }}
{{ with $.Param "microusername" }}<link rel="me" href="https://micro.blog/{{ . }}">{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if .IsTranslated -}}
{{ range .Translations -}}
<link rel="alternate" hreflang="{{ .Site.LanguageCode | default .Lang }}" href="{{ .Permalink }}">
{{ end -}}
{{ end -}}