w2ng/themes/hugo-w2ng/layouts/_default/single.html
2020-01-09 16:21:40 +08:00

34 lines
1.6 KiB
HTML

{{ define "main" }}
<article itemscope itemtype="http://schema.org/Article" class="max-w-3xl mx-auto leading-relaxed">
<header class="flex flex-col meta">
{{- partial "taxonomy.html" . -}}
<h1 itemprop="name" class="text-center text-3xl my-4 md:my-6">{{ .Title }}</h1>
{{ if not .Params.disableMeta }}
<h3 class="text-center text-xl">
{{ with $.Site.Params.AuthorName }}
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{ . }}</span>
{{ end }}
{{ if .Params.date }}
{{ if $.Site.Params.AuthorName }} / {{ end }}
<span itemprop="datePublished"
content="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</span>
{{ end }}
</h3>
{{ end }}
</header>
<hr class="block my-10 mx-auto max-w-xs h-px border-t border-black">
<div itemprop="articleBody" class="content markdown">
{{ .Content }}
</div>
{{- if (and .IsPage .Params.comment | default true ) -}}
<hr class="block my-10 mx-auto max-w-xs h-px border-t border-black">
<div id="isso-thread"></div>
{{ with .Page.Site.Params.comments.isso.Host }}
<script data-isso="{{ . }}" data-isso-css="true" data-isso-lang="zh_CN"
data-isso-reply-to-self="false" data-isso-reply-notifications="true" data-isso-require-author="true"
data-isso-require-email="true" data-isso-vote="true" src="{{ . }}js/embed.min.js"></script>
{{ end }}
{{ end }}
</article>
{{ end }}