diff --git a/layouts/partials/scratch.html b/layouts/partials/scratch.html index 881bdf2..3cbf6a8 100644 --- a/layouts/partials/scratch.html +++ b/layouts/partials/scratch.html @@ -23,6 +23,17 @@ {{ end }} {{ end }} + {{ with $authors := $p.Params.authors }} + {{ range $author := $authors }} + {{ $authorLink := printf "/author/%s" $author }} + {{ with ($_.Get $authorLink) }} + {{ $_.SetInMap $authorLink "backlinks" (uniq ((index ($_.Get $authorLink) "backlinks") | append $p)) }} + {{ else }} + {{ $_.SetInMap $authorLink "backlinks" (slice $p) }} + {{ end }} + {{ end }} + {{ end }} + {{ $gp := $.GetPage $pPath }} {{ $gpPath := printf "/%s" $gp.File }} {{ range $k, $v := $gp.Params }}