From e4caa0d1d7fb3bdca6dee07fee299a3acdf40043 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 28 Dec 2021 00:35:42 +0000
Subject: [PATCH] add taxonomy and term lists
---
layouts/partials/backlinks.html | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html
index 48ffecc..daee6ec 100644
--- a/layouts/partials/backlinks.html
+++ b/layouts/partials/backlinks.html
@@ -4,14 +4,12 @@
{{$host := strings.TrimRight "/" $url.Path }}
{{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink) }}
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
+ {{$contentTable := $.Site.Data.contentIndex}}
{{if $inbound}}
- {{- range $inbound -}}
- {{$src := index . "source"}}
- {{$src = replace $src " " "-"}}
- {{$src = replace $src `\` ""}}
-
+ {{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}}
+ {{- range $cleanedInbound | uniq -}}
<li>
- <a href="../{{$src | safeHTML}}">{{index . "source"}}</a>
+ <a href="{{.}}">{{index (index $contentTable .) "title"}}</a>
</li>
{{- end -}}
{{else}}
@@ -19,4 +17,4 @@
No backlinks found
</li>
{{end}}
-</ul>
\ No newline at end of file
+</ul>
--
Gitblit v1.10.0