sadium/layouts/_default/list.html
Артём 0a5442d1b7
All checks were successful
/ site (push) Successful in 1s
Opengraph test
2024-08-08 12:35:07 +03:00

63 lines
1.6 KiB
HTML

{{ define "main" }}
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<aside>
{{ .TableOfContents }}
</aside>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{ .Date | time.Format ":date_medium" }}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ partial "opengraph.html" . }}
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}