diff --git a/layouts/shortcodes/article.html b/layouts/shortcodes/article.html index 68d74e71..b85a3ca2 100644 --- a/layouts/shortcodes/article.html +++ b/layouts/shortcodes/article.html @@ -1,9 +1,10 @@ -{{ $parent := .Page.RelPermalink }} -
- {{ $RelPermalink := .Get "link" }} - {{ range ( where .Site.RegularPages "RelPermalink" $RelPermalink | first 1 ) }} - {{ if not (eq .RelPermalink $parent) }} - {{ partial "article-link/simple.html" . }} - {{ end }} - {{end}} -
\ No newline at end of file +{{ $link := .Get "link" }} +{{ $target := .Page }} +{{ if ne $link .Page.RelPermalink }} + {{ $target = index (first 1 (where .Site.AllPages "RelPermalink" $link)) 0 }} +{{ end }} +{{ if $target }} +
+ {{ partial "article-link/simple.html" $target }} +
+{{ end }}