From 3583265f80afa081bf7a1fe996a9b3fe3c4e32e0 Mon Sep 17 00:00:00 2001
From: meleu <meleu@users.noreply.github.com>
Date: Mon, 04 Apr 2022 20:30:23 +0000
Subject: [PATCH] docs: warn about possible lost of customization
---
layouts/partials/backlinks.html | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html
index d214386..425ec67 100644
--- a/layouts/partials/backlinks.html
+++ b/layouts/partials/backlinks.html
@@ -2,16 +2,19 @@
<ul class="backlinks">
{{$url := urls.Parse .Site.BaseURL }}
{{$host := strings.TrimRight "/" $url.Path }}
- {{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink) }}
- {{$linkIndex := getJSON "/static/linkIndex.json"}}
+ {{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink)}}
+ {{$linkIndex := getJSON "/assets/indices/linkIndex.json"}}
{{$inbound := index $linkIndex.index.backlinks $curPage}}
- {{$contentTable := getJSON "/static/contentIndex.json"}}
+ {{$contentTable := getJSON "/assets/indices/contentIndex.json"}}
{{if $inbound}}
{{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}}
{{- range $cleanedInbound | uniq -}}
- <li>
- <a href="{{$url}}{{.}}">{{index (index $contentTable .) "title"}}</a>
- </li>
+ {{$l := printf "%s%s" $host .}}
+ {{with (index $contentTable .)}}
+ <li>
+ <a href="{{$l}}">{{index (index . "title")}}</a>
+ </li>
+ {{end}}
{{- end -}}
{{else}}
<li>
--
Gitblit v1.10.0