blob: 524145a7d1466d4832ccac8457250941af134b2a (
plain) (
tree)
|
|
{{ define "main" }}
<div>
<h1>{{ .Title }}</h1>
<div class="meta">
{{- $pub := .Date.Format "Jan 2, 2006" -}}
{{- $mod := "" -}}
{{- if (not .GitInfo) }}
{{- $mod = .Lastmod.Format "Jan 2, 2006" -}}
{{ else }}
{{- $mod = .Page.GitInfo.CommitDate.Format "Jan 2, 2006" -}}
{{ end -}}
{{ if eq $pub $mod }}
<div class="meta_date">published {{ $pub }}</div>
{{ else }}
<div class="meta_date">published {{ $pub }} - last modified {{ $mod }}</div>
{{ end }}
{{ if .Params.tags }}
<div>
{{ if eq (len .Params.tags) 1 }}
tag:
{{ else }}
tags:
{{ end }}
{{ range $idx, $tag := .Params.tags }}
<span class="meta_tags"><a href="/tags/{{ $tag | urlize }}/">{{ $tag }}</a></span>
{{ end }}
</div>
{{ end }}
</div>
{{ if .Params.toc }}
<div id="toc_small">
<summary>Table of contents</summary>
{{ .TableOfContents }}
</div>
{{ end }}
<article class="article">
{{ .Content }}
</article>
</div>
{{ if .Params.toc }}
<div class="toc">
<strong>Table of contents</strong>
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}
|