blob: 7a85a056078bfcaa288c1920e54a08bbb446cd73 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{{ define "main" }}
<div>
<h1>{{ .Title }}</h1>
<div id="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 id="meta_date">published {{ $pub }}</div>
{{ else }}
<div id="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 id="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>
{{ .Content }}
</article>
</div>
{{ if .Params.toc }}
<div id="toc">
<strong>Table of contents</strong>
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}
|