Add archive
This commit is contained in:
parent
7518d84366
commit
e8690efc6c
7
content/archive.md
Normal file
7
content/archive.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
+++
|
||||||
|
title = "Archive"
|
||||||
|
name = "Archive"
|
||||||
|
url = "/archive/"
|
||||||
|
menu = "main"
|
||||||
|
type = archive
|
||||||
|
+++
|
25
layouts/archive/single.html
Normal file
25
layouts/archive/single.html
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{{ define "title" -}}
|
||||||
|
{{ .Params.name }} | {{ .Site.Title }}
|
||||||
|
{{- end }}
|
||||||
|
{{ define "header" }}
|
||||||
|
{{ partial "menu" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ define "main" }}
|
||||||
|
<header>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
</header>
|
||||||
|
{{ range (where .Site.RegularPages "Section" "post").GroupByDate "2006" }}
|
||||||
|
<h2>{{ .Key }}</h2>
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li>
|
||||||
|
<span>{{ .Date.Format "02 Jan" }}</span>
|
||||||
|
<a href="{{ .Permalink }}" id="{{ .UniqueID }}" alt="{{ .Title }}">{{ .Title | markdownify }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ define "footer" }}
|
||||||
|
{{ partial "powered-by" . }}
|
||||||
|
{{ end }}
|
4
layouts/partials/posts/byline.html
Normal file
4
layouts/partials/posts/byline.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<p class="muted">
|
||||||
|
<a href="/archives/#{{ .UniqueID }}">Published</a> {{ with .Params.categories }}in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "post/category-link" ".") "chomp" ".") ", " " and "}}</span>
|
||||||
|
{{ end }}{{ with .Params.tags }} and tagged {{ delimit (apply (apply (sort .) "partial" "post/tag-link" ".") "chomp" ".") ", " " and " }}{{ end }}. This entry has <span itemprop="wordCount">{{ .WordCount }}</span> words. If you want to discuss it with me, send me a <a href="https://twitter.com/intent/tweet?text=@daiweico, about '{{ .Title }}'" target="_blank" title="Tweet me about '{{ .Title }}'">tweet</a>!
|
||||||
|
</p>
|
Loading…
Reference in New Issue
Block a user