diff --git a/layouts/partials/list-item.html b/layouts/partials/list-item.html index 56742f8..1c15ce1 100644 --- a/layouts/partials/list-item.html +++ b/layouts/partials/list-item.html @@ -3,16 +3,18 @@ {{- $page := . -}} {{- $url := "" -}} {{- $anchor := "" -}} + {{- $title := "" -}} {{- if reflect.IsMap . -}} {{- $anchor = .anchor -}} {{- $page = .page -}} + {{- $title = .title -}} {{- end -}} {{- if ne $anchor "" -}} {{- $url = printf "%s#%v" $page.Permalink $anchor -}} {{- else -}} {{- $url = $page.Permalink -}} {{- end -}} - {{ $page.Title }}   + {{ or $title $page.Title }}   {{ if $page.Date -}} {{ $page.Date.Format (i18n "dateFormat") }} {{- else if $page.Params.Teaser -}}{{ $page.Params.Teaser }} diff --git a/layouts/shortcodes/ilink.html b/layouts/shortcodes/ilink.html index ebcc538..09b986a 100644 --- a/layouts/shortcodes/ilink.html +++ b/layouts/shortcodes/ilink.html @@ -10,7 +10,8 @@ {{- $url := printf "%s%s%s" .Permalink $fragsep $frag -}} {{- $text := or $inner .Title -}} {{- $anchor := printf "link-%d" $linkid -}} + {{- $title := printf "%s (%d)" $this.Title $linkid -}} {{ $text | markdownify }} - {{- .Scratch.Add "backlinks" (slice (dict "anchor" $anchor "page" $this)) -}} + {{- .Scratch.Add "backlinks" (slice (dict "anchor" $anchor "page" $this "title" $title)) -}} {{- end -}}