diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 4006955..d4e83cd 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -20,19 +20,18 @@ {{- end }} - {{- $site := .Site -}} {{ with .Params.Topics -}}

{{i18n "topics"}}

- {{ range . -}} - {{- $page := $site.GetPage (printf "/topics/%s" .) -}} + {{ range . -}} + {{- $page := $.GetPage (printf "/topics/%s" .) -}} {{ $page.Title }} - {{- end }} + {{- end }}
{{- end }} diff --git a/layouts/shortcodes/ilink.html b/layouts/shortcodes/ilink.html index 9503b36..6ba734a 100644 --- a/layouts/shortcodes/ilink.html +++ b/layouts/shortcodes/ilink.html @@ -2,8 +2,7 @@ {{- $pid := or (.Get "pid") (.Get "pageid") -}} {{- $pages := where .Site.RegularPages "Params.pageid" "eq" $pid -}} {{- $frag := .Get "id" -}} -{{- $fragsep := "" -}} -{{- if ne $frag "" -}}{{- $fragsep = "#" -}}{{- end -}} +{{- $fragsep := cond (eq $frag "") "" "#" -}} {{- $inner := .Inner -}} {{- range $pages -}} {{- $url := printf "%s%s%s" .Permalink $fragsep $frag -}}