mmote.ru/themes/mmotium/layouts/_default/single.html

33 lines
1.7 KiB
HTML

{{ define "head_meta" }}
<meta property="og:type" content="article">
<meta property="og:title" content="{{ .Title }}">
<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if and (.IsPage) (.Summary) }}{{ .Summary }}{{ else }}{{ .Title }}{{ end }}{{ end }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if and (.IsPage) (.Summary) }}{{ .Summary }}{{ else }}{{ .Title }}{{ end }}{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format "2006-01-02T15:04:05-07:00" | printf "content=%q" | safeHTMLAttr }}>{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format "2006-01-02T15:04:05-07:00" | printf "content=%q" | safeHTMLAttr }}>{{ end }}
{{ $thumb := $.Resources.Get $.Params.featured_image -}}
{{ with $thumb }}<meta property="og:image" content="{{ (.Fit "1024x1024").Permalink }}">{{end}}
{{end}}
{{ define "main" }}
<div class="page-wrapper">
<div class="content-column">
<section class="single post">
<sub>
<time>{{.Date.Format "02.01.2006"}}</time>
</sub>
<h1 class="page-title">{{ .Title }}</h1>
{{- .Content -}}
</section>
<section class="comments">
{{ template "_internal/disqus.html" . }}
</section>
</div>
{{ partial "sidebar.html" . }}
</div>
{{ end }}