From ae72154594a25b5248581b5414ff62fcd5197c3b Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Wed, 6 Nov 2019 14:56:42 +0100 Subject: testing out microblogging --- archetypes/micro.md | 3 +++ layouts/index.html | 11 +++++++++++ layouts/micro/index.html | 16 ++++++++++++++++ layouts/micro/list.html | 23 +++++++++++++++++++++++ layouts/micro/single.html | 11 +++++++++++ 5 files changed, 64 insertions(+) create mode 100644 archetypes/micro.md create mode 100644 layouts/micro/index.html create mode 100644 layouts/micro/list.html create mode 100644 layouts/micro/single.html diff --git a/archetypes/micro.md b/archetypes/micro.md new file mode 100644 index 0000000..0d42a95 --- /dev/null +++ b/archetypes/micro.md @@ -0,0 +1,3 @@ +--- +date: {{ .Date }} +--- diff --git a/layouts/index.html b/layouts/index.html index 4f74872..7516cf1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -6,6 +6,17 @@

{{ .Site.Params.intro }}

+
+

Microblog

+ {{ range (where .Site.RegularPages "Type" "micro") }} +
+ {{ .Summary }} + {{ if .Truncated }} + Read more + {{ end }} +
+ {{ end }} +

Archive

{{ range (where .Site.RegularPages "Type" "post").GroupByDate "2006" }} diff --git a/layouts/micro/index.html b/layouts/micro/index.html new file mode 100644 index 0000000..e69e3bf --- /dev/null +++ b/layouts/micro/index.html @@ -0,0 +1,16 @@ +{{ partial "head" . }} +
+ + {{ .Content }} +
    + {{ range .Paginator.Pages }} +
  • {{.Title}} +
    + {{ .Summary }} +
    +
  • + {{ end }} +
+ +
+{{ partial "footer" . }} diff --git a/layouts/micro/list.html b/layouts/micro/list.html new file mode 100644 index 0000000..030d847 --- /dev/null +++ b/layouts/micro/list.html @@ -0,0 +1,23 @@ +{{ partial "head" . }} + +
+ +

{{ .Title }}

+
+
+

{{ .Site.Params.intro }}

+
+

Archive

+ {{ range (where .Site.RegularPages "Type" "micro").GroupByDate "2006" }} +

{{ .Key }}

+ {{ range .Pages }} +
+ {{ .Title }} + {{ .Date.Format "January 2, 2006" }} +{{ .Content }} +
+ {{ end }} + {{ end }} +
+
+{{ partial "footer" . }} diff --git a/layouts/micro/single.html b/layouts/micro/single.html new file mode 100644 index 0000000..d091c16 --- /dev/null +++ b/layouts/micro/single.html @@ -0,0 +1,11 @@ +{{ partial "head" . }} +
+
+

{{ .Title }} LOL

+ {{ .Date.Format "January 2, 2006" }} +{{ if ne (.Lastmod.Format "January 2, 2006") (.Date.Format "January 2, 2006") }}
Last modified {{ .Lastmod.Format "January 2, 2006" }}{{ end }} + +{{ .Content }} +
+
+{{ partial "footer" . }} -- cgit v1.2.3