From 81f002c3615784ff38fc957c14b993f08fb134fe Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 6 Apr 2021 12:33:39 -0700 Subject: 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. --- users/fcuny/notes/layouts/partials/postlist.html | 30 ++++++++++++++++++++++++ users/fcuny/notes/layouts/taxonomy/tag.html | 6 +++++ 2 files changed, 36 insertions(+) create mode 100644 users/fcuny/notes/layouts/partials/postlist.html create mode 100644 users/fcuny/notes/layouts/taxonomy/tag.html (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/postlist.html b/users/fcuny/notes/layouts/partials/postlist.html new file mode 100644 index 0000000..3695d82 --- /dev/null +++ b/users/fcuny/notes/layouts/partials/postlist.html @@ -0,0 +1,30 @@ +

← Back to Franck's homepage

+ +{{ range .GroupByDate "2006-Jan" }} +

{{ .Key }}

+ +{{ end }} diff --git a/users/fcuny/notes/layouts/taxonomy/tag.html b/users/fcuny/notes/layouts/taxonomy/tag.html new file mode 100644 index 0000000..2b7d98a --- /dev/null +++ b/users/fcuny/notes/layouts/taxonomy/tag.html @@ -0,0 +1,6 @@ +{{ define "main" }} + + {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }} + {{ partial "postlist" $pgs }} + +{{ end }} -- cgit 1.4.1