From a3e6f189fd5efc53d86d411e90c491f664a75963 Mon Sep 17 00:00:00 2001 From: jk Date: Wed, 17 Jun 2020 22:34:02 +0100 Subject: [PATCH] bringing bookmarks section into single.html --- content/note/5eea8190/index.md | 1 - .../nipponalba/layouts/_default/single.html | 24 +++++++++- .../layouts/partials/backup_bookmarks.html | 45 ------------------- 3 files changed, 23 insertions(+), 47 deletions(-) delete mode 100644 themes/nipponalba/layouts/partials/backup_bookmarks.html diff --git a/content/note/5eea8190/index.md b/content/note/5eea8190/index.md index 184a5384..bd5be71e 100644 --- a/content/note/5eea8190/index.md +++ b/content/note/5eea8190/index.md @@ -30,4 +30,3 @@ Webmention.rocks test post Test 21 Test 22 Test 23 - diff --git a/themes/nipponalba/layouts/_default/single.html b/themes/nipponalba/layouts/_default/single.html index 42265732..80e762fd 100644 --- a/themes/nipponalba/layouts/_default/single.html +++ b/themes/nipponalba/layouts/_default/single.html @@ -64,7 +64,29 @@ {{ else if eq .Type "bookmarkof" }} -{{ partial "bookmarks.html" . }} +{{ $cats := slice }} +{{ range .Site.Data.bookmarks }} + {{ $cats = $cats | append .category }} +{{ end }} +{{ $cats = uniq $cats | sort }} +{{ range $cats }} + {{ $cat := . }} +

{{ $cat }}

+ {{ range $.Site.Data.bookmarks }} + {{ if eq .category $cat }} +
+ + +
+{{ end }} +{{ end }} +{{ end }} {{ else }}