about summary refs log tree commit diff
path: root/layouts/partials/postlist.html
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-04-06 12:33:39 -0700
committerFranck Cuny <franck@fcuny.net>2021-04-11 11:51:39 -0700
commit446f5c3a3cbfb890ed85ea013de5016a3b6f6040 (patch)
treefbef999a80018aa53b9f2cc266b318fe995319f7 /layouts/partials/postlist.html
parentlayout: add date and tags to single pages (diff)
downloadfcuny.net-446f5c3a3cbfb890ed85ea013de5016a3b6f6040.tar.gz
taxonomy: add pages for tags
We want to have pages that list all the articles related to a given tag.

Update the configuration to add support for tags and the permalink
structure.
Diffstat (limited to 'layouts/partials/postlist.html')
-rw-r--r--layouts/partials/postlist.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/layouts/partials/postlist.html b/layouts/partials/postlist.html
new file mode 100644
index 0000000..3695d82
--- /dev/null
+++ b/layouts/partials/postlist.html
@@ -0,0 +1,30 @@
+<p><a href="/">&larr; Back to Franck's homepage</a></p>
+
+{{ range .GroupByDate "2006-Jan" }}
+  <h2>{{ .Key }}</h2>
+  <ul>
+    {{ range .Pages.ByDate }}
+    <li>
+      <div>
+        <a href="{{ .Permalink }}"><h3>{{ .Title }}</h3></a>
+	    {{ if .Params.tags }}
+	    <div>
+	      Tags:
+	      {{ range $idx, $tag := .Params.tags }}
+	      <span class="tags"><a href="/tags/{{ $tag | urlize }}/">{{ $tag }}</a></span>
+	      {{ end }}
+	    </div>
+	    {{ else }}
+	    <div></div>
+	    {{ end }}
+      </div>
+      <div>
+	    <p>
+	      {{ .Summary }}
+	      <span><a href="{{ .Permalink }}">Read more →</a></span>
+	    </p>
+      </div>
+    </li>
+    {{ end }}
+  </ul>
+{{ end }}