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

37 lines
1.9 KiB
HTML
Raw Permalink Normal View History

2023-01-01 18:21:01 +03:00
{{ define "head_meta" }}
2023-01-07 11:53:48 +03:00
<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 }}">
2023-01-07 11:53:48 +03:00
<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 }}
2023-01-01 18:21:01 +03:00
{{ $thumb := $.Resources.Get $.Params.featured_image -}}
2023-01-07 11:53:48 +03:00
{{ with $thumb }}<meta property="og:image" content="{{ (.Fit "1024x1024").Permalink }}">{{end}}
2023-01-01 18:21:01 +03:00
{{end}}
{{ define "main" }}
<div class="page-wrapper">
<div class="content-column">
<section class="single post">
2024-04-11 09:03:15 +03:00
<sub>
<time>{{.Date.Format "02.01.2006"}}</time>
</sub>
2023-01-07 20:13:13 +03:00
<h1 class="page-title">{{ .Title }}</h1>
2023-01-01 18:21:01 +03:00
2023-01-07 11:12:50 +03:00
{{- .Content -}}
</section>
2023-01-01 22:58:40 +03:00
<section class="comments">
2024-04-26 22:56:02 +03:00
{{ if .Param "telegram_entry_id" }}
{{ partial "partials/telegram-comments" . }}
{{ else }}
{{ template "_internal/disqus.html" . }}
{{ end }}
</section>
2023-01-01 22:58:40 +03:00
</div>
{{ partial "sidebar.html" . }}
</div>
2023-01-01 18:21:01 +03:00
{{ end }}