From e8690efc6cd082fd7ba390fd746a1bbaf5abc1c3 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 7 Apr 2017 16:50:21 +0200 Subject: [PATCH] Add archive --- content/archive.md | 7 +++++++ layouts/archive/single.html | 25 +++++++++++++++++++++++++ layouts/partials/posts/byline.html | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 content/archive.md create mode 100644 layouts/archive/single.html create mode 100644 layouts/partials/posts/byline.html diff --git a/content/archive.md b/content/archive.md new file mode 100644 index 0000000..d498732 --- /dev/null +++ b/content/archive.md @@ -0,0 +1,7 @@ ++++ +title = "Archive" +name = "Archive" +url = "/archive/" +menu = "main" +type = archive ++++ diff --git a/layouts/archive/single.html b/layouts/archive/single.html new file mode 100644 index 0000000..80063c5 --- /dev/null +++ b/layouts/archive/single.html @@ -0,0 +1,25 @@ +{{ define "title" -}} + {{ .Params.name }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "menu" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+{{ range (where .Site.RegularPages "Section" "post").GroupByDate "2006" }} +

{{ .Key }}

+ +{{ end }} +{{ end }} +{{ define "footer" }} + {{ partial "powered-by" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/posts/byline.html b/layouts/partials/posts/byline.html new file mode 100644 index 0000000..7138b72 --- /dev/null +++ b/layouts/partials/posts/byline.html @@ -0,0 +1,4 @@ +

+ Published {{ with .Params.categories }}in {{ delimit (apply (apply (sort .) "partial" "post/category-link" ".") "chomp" ".") ", " " and "}} + {{ end }}{{ with .Params.tags }} and tagged {{ delimit (apply (apply (sort .) "partial" "post/tag-link" ".") "chomp" ".") ", " " and " }}{{ end }}. This entry has {{ .WordCount }} words. If you want to discuss it with me, send me a tweet! +

\ No newline at end of file