commit d1dd605b26ce9fb4c9cdd3969956f0f95699d200
parent f14ce58742e5ae27e76c199169bec5e3ad4d8ad8
Author: corndog <cauchyn@firemail.cc>
Date: Thu, 4 Oct 2018 19:36:49 -0700
Remove unused templates and template-ize Date
HTML5 has <time datetime="2006-01-02"> tag to help
machine readability, let's make use of it.
Diffstat:
2 files changed, 7 insertions(+), 30 deletions(-)
diff --git a/in/me/index.md b/in/me/index.md
@@ -24,7 +24,7 @@ description: Some things I like.
# Just a few of my favorite things
-<small>*Last modified: {{ .ModTime.Format "Jan 02 2006" }}*</small>
+<small>*Last modified: {{ template "date" .ModTime }}*</small>
I first read of a view on identity in maybe 2010 or 2011 that claimed people are the
collection of their answers to *"I love..."*[^where]. I kept a short list of links to
diff --git a/site.tmpl b/site.tmpl
@@ -26,35 +26,12 @@
</html>
{{ end }}
-{{define "date"}}
-<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">
- {{ .Format "2006 January 02" }}
-</time>
+{{ define "date" }}
+<time datetime="{{ .Format "2006-01-02" }}">{{ .Format "02 Jan 2006" }}</time>
{{end}}
-{{ define "page" }}{{ template "header" . }}
- {{ .Content }}
-{{ template "footer" . }}{{ end }}
-
-{{ define "post" }}
-<article>
- <header>
- <h1>{{ .Title }}</h1>
- <div class="info">
- {{ template "date" .Date }} —
- {{ range $i, $t := .Tags }}{{if $i}},{{end}}
- <a href="/tags/{{ $t }}/">{{ $t }}</a>{{ end }}
- </div>
- </header>
- <section>
- {{ .Content }}
- </section>
-</article>
-{{ end }}
-
-{{define "tag"}}
-# Pages tagged with {{ .Title }}
-{{ range .Site.Pages.WithTag .Title }}
-- [{{ .Title }}](../../{{ .Url }})
-{{ end }}
+{{ define "page" }}
+{{ template "header" . }}
+{{ .Content }}
+{{ template "footer" . }}
{{ end }}