mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
dedupe backlinks
This commit is contained in:
parent
39592347cc
commit
094ab9d064
2 changed files with 4 additions and 5 deletions
|
@ -29,6 +29,7 @@ To customize the Interactive Graph view, you can poke around `data/graphConfig.y
|
||||||
enableLegend: false # automatically generate a legend
|
enableLegend: false # automatically generate a legend
|
||||||
enableDrag: true # allow dragging nodes in the graph
|
enableDrag: true # allow dragging nodes in the graph
|
||||||
enableZoom: true # allow zooming and panning the graph
|
enableZoom: true # allow zooming and panning the graph
|
||||||
|
depth: -1 # how many neighbours of the current node to show (-1 is all nodes)
|
||||||
paths: # colour specific nodes path off of their path
|
paths: # colour specific nodes path off of their path
|
||||||
- /moc: "#4388cc"
|
- /moc: "#4388cc"
|
||||||
```
|
```
|
||||||
|
|
|
@ -6,12 +6,10 @@
|
||||||
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
|
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
|
||||||
{{$contentTable := $.Site.Data.contentIndex}}
|
{{$contentTable := $.Site.Data.contentIndex}}
|
||||||
{{if $inbound}}
|
{{if $inbound}}
|
||||||
{{- range $inbound -}}
|
{{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}}
|
||||||
{{$src := index . "source"}}
|
{{- range $cleanedInbound | uniq -}}
|
||||||
{{$src = replace $src " " "-"}}
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{$src}}">{{index (index $contentTable $src) "title"}}</a>
|
<a href="{{.}}">{{index (index $contentTable .) "title"}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
Loading…
Reference in a new issue