45 lines
1.8 KiB
HTML
45 lines
1.8 KiB
HTML
{{ define "main" }}
|
|
<article itemscope itemtype="http://schema.org/Article" class="max-w-3xl mx-auto leading-relaxed">
|
|
{{ if .IsPage }}
|
|
<section class="flex flex-col meta">
|
|
<h1 class="text-center text-4xl my-8 md:my-12">{{ .Title }}</h1>
|
|
{{ if not .Params.disableMeta }}
|
|
<h3 class="text-center text-2xl">
|
|
{{ 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>
|
|
<h3 class="md:order-first text-xl text-right mt-4 md:mt-0">
|
|
{{ with .Params.categories }}
|
|
<span itemprop="articleSection" class="category">
|
|
{{ range . }}
|
|
<a href="{{ . | printf "categories/%s" | relURL }}" rel="category">{{ . }}</a>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
{{ if .Params.categories }} / {{ end }}
|
|
{{ with .Params.tags }}
|
|
<span itemprop="keywords" class="tags text-base font-mono">
|
|
{{ range . }}
|
|
<a href="{{ . | printf "tags/%s" | relURL }}" class="m-1" rel="tag">#{{ . }}</a>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
</h3>
|
|
{{ end }}
|
|
</section>
|
|
{{ end }}
|
|
{{ if not .IsHome }}
|
|
<hr class="block my-10 mx-auto max-w-xs h-px border-t border-black">
|
|
{{ end }}
|
|
<section itemprop="articleBody" class="content markdown">
|
|
{{ .Content }}
|
|
</section>
|
|
</article>
|
|
{{ end }} |