2021-07-18 20:02:53 +03:00
|
|
|
<h3>Backlinks</h3>
|
|
|
|
<ul class="backlinks">
|
2021-08-12 16:29:35 +03:00
|
|
|
{{$url := urls.Parse .Site.BaseURL }}
|
|
|
|
{{$host := strings.TrimRight "/" $url.Path }}
|
2022-04-02 22:59:38 +03:00
|
|
|
{{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink)}}
|
2022-03-04 05:25:30 +03:00
|
|
|
{{$linkIndex := getJSON "/assets/indices/linkIndex.json"}}
|
2022-02-16 03:39:14 +03:00
|
|
|
{{$inbound := index $linkIndex.index.backlinks $curPage}}
|
2022-03-04 05:25:30 +03:00
|
|
|
{{$contentTable := getJSON "/assets/indices/contentIndex.json"}}
|
2021-07-18 20:02:53 +03:00
|
|
|
{{if $inbound}}
|
2021-12-27 21:15:10 +03:00
|
|
|
{{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}}
|
|
|
|
{{- range $cleanedInbound | uniq -}}
|
2022-04-28 20:48:31 +03:00
|
|
|
{{$l := printf "%s%s/" $host .}}
|
2022-04-01 09:15:54 +03:00
|
|
|
{{with (index $contentTable .)}}
|
|
|
|
<li>
|
|
|
|
<a href="{{$l}}">{{index (index . "title")}}</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2021-07-18 16:35:42 +03:00
|
|
|
{{- end -}}
|
2021-07-18 20:02:53 +03:00
|
|
|
{{else}}
|
|
|
|
<li>
|
|
|
|
No backlinks found
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2021-12-24 01:05:27 +03:00
|
|
|
</ul>
|