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 }}
|
|
|
|
{{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink) }}
|
2021-07-18 16:35:42 +03:00
|
|
|
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
|
2021-12-24 01:05:27 +03:00
|
|
|
{{$contentTable := $.Site.Data.contentIndex}}
|
2021-07-18 20:02:53 +03:00
|
|
|
{{if $inbound}}
|
2021-07-18 16:35:42 +03:00
|
|
|
{{- range $inbound -}}
|
2021-10-23 00:04:09 +03:00
|
|
|
{{$src := index . "source"}}
|
|
|
|
{{$src = replace $src " " "-"}}
|
|
|
|
|
|
|
|
<li>
|
2021-12-24 01:05:27 +03:00
|
|
|
<a href="{{$src}}">{{index (index $contentTable $src) "title"}}</a>
|
2021-10-23 00:04:09 +03:00
|
|
|
</li>
|
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>
|