blob: b4c544334c90e350fc9616ea90286d73fb79d532 (
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
|
{{ define "main" }}
<h1>{{ .Title }}</h1>
<div class="meta">
{{- $pub := .Date.Format "2006-01-02" -}}
{{- $mod := "" -}}
{{- if (not .GitInfo) }}
{{- $mod = .Lastmod.Format "2006-01-02" -}}
{{ else }}
{{- $mod = .Page.GitInfo.CommitDate.Format "2006-01-02" -}}
{{ 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 }}
in tag
{{ else }}
in 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 class="toc">
<strong>Table of Contents</strong>
{{ .TableOfContents }}
</div>
{{ end }}
{{ .Content }}
{{ end }}
|