diff options
author | isaced <isaced@163.com> | 2021-12-04 14:28:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-04 14:28:15 +0300 |
commit | 7caa7d42181ed6ffa4030dba28973a0a1fbe1b27 (patch) | |
tree | 817eaed9d2bc59b62f871a3dac9f1bfc4d90cbde | |
parent | adeeba8fb37c9c6e33161bf57d659f2bbbc17e70 (diff) |
Add archive page support
See #60
-rw-r--r-- | layouts/archives/single.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/layouts/archives/single.html b/layouts/archives/single.html new file mode 100644 index 0000000..4ba0a79 --- /dev/null +++ b/layouts/archives/single.html @@ -0,0 +1,27 @@ +{{ define "main" }} + +<main> + <div class="post"> + {{ partial "single/title.html" . }} + {{ partial "single/header.html" . }} + + <div class="post-archive"> + {{ range (where (where .Site.Pages "IsPage" "=" true) "Params.hidden" "!=" true ).GroupByDate "2006" }} + <h2>{{ .Key }}</h2> + <ul class="listing"> + {{ range .Pages }} + <li> + <span class="date">{{ .Date.Format "01/02" }}</span> + <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> + {{ end }} + + </div> + + {{ partial "single/footer.html" . }} + </div> +</main> + +{{ end }}
\ No newline at end of file |