mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-29 12:47:34 +00:00
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
{{ define "postheadmeta" }}
|
|
{{ with .Canonical }}
|
|
<meta property="og:url" content="{{ . }}">
|
|
<meta property="twitter:url" content="{{ . }}">
|
|
{{ end }}
|
|
{{ with .Data.RenderedTitle }}
|
|
<meta property="og:title" content="{{ . }}">
|
|
<meta property="twitter:title" content="{{ . }}">
|
|
{{ end }}
|
|
{{ with summary .Data }}
|
|
<meta name="description" content="{{ . }}">
|
|
<meta property="og:description" content="{{ . }}">
|
|
<meta property="twitter:description" content="{{ . }}">
|
|
{{ end }}
|
|
{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
|
{{ with .Data.Published }}
|
|
<meta itemprop="datePublished" content="{{ dateformat . $ISO8601 }}">
|
|
{{ end }}
|
|
{{ with .Data.Updated }}
|
|
<meta itemprop="dateModified" content="{{ dateformat . $ISO8601 }}">
|
|
{{ end }}
|
|
{{ range $key, $image := photolinks .Data }}
|
|
<meta itemprop="image" content="{{ $image }}">
|
|
<meta property="og:image" content="{{ $image }}">
|
|
<meta property="twitter:image" content="{{ $image }}">
|
|
{{ end }}
|
|
{{ end }} |