add simple backlinks template

This commit is contained in:
jackyzha0 2021-07-17 14:38:27 -04:00
parent 7d80a9773b
commit 4c910a7bc2
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<ol class="backlinks">
{{$curPage := strings.TrimRight "/" .Page.RelPermalink }}
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
{{- range $inbound -}}
<li>
<a href="{{index . "source"}}">{{index . "source"}}</a>
</li>
{{- end -}}
</ol>