diff --git a/layouts/shortcodes/article.html b/layouts/shortcodes/article.html
index 393529a4..b85a3ca2 100644
--- a/layouts/shortcodes/article.html
+++ b/layouts/shortcodes/article.html
@@ -1,10 +1,10 @@
{{ $link := .Get "link" }}
-{{ $parent := .Page.RelPermalink }}
-{{ with first 1 (where .Site.AllPages "RelPermalink" $link) }}
- {{ $target := index . 0 }}
- {{ if ne $target.RelPermalink $parent }}
-
- {{ partial "article-link/simple.html" $target }}
-
- {{ end }}
-{{ end }}
\ No newline at end of file
+{{ $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 }}