diff options
Diffstat (limited to 'layouts/_default/summary.html')
-rw-r--r-- | layouts/_default/summary.html | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index d880744..4a0ee91 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -25,7 +25,11 @@ <article class="postShorten postShorten--thumbnailimg-{{ .Scratch.Get "thumbnailImagePosition" }}" itemscope itemType="http://schema.org/BlogPosting"> <div class="postShorten-wrap"> {{ if and (.Scratch.Get "thumbnailImage") (eq (.Scratch.Get "thumbnailImagePosition") "top")}} - <a href="{{ .Permalink }}"> + {{ with .Params.link }} + <a href="{{ . | absURL }}" target="_blank"> + {{ else }} + <a href="{{ $.Permalink }}"> + {{ end }} <div class="postShorten-thumbnailimg"> <img alt="" itemprop="image" src="{{ .Scratch.Get "thumbnailImage" }}"/> </div> @@ -33,7 +37,11 @@ {{ end }} <div class="postShorten-header"> <h1 class="postShorten-title" itemprop="headline"> - <a class="link-unstyled" href="{{ .Permalink }}"> + {{ with .Params.link }} + <a class="link-unstyled" href="{{ . | absURL }}" target="_blank"> + {{ else }} + <a class="link-unstyled" href="{{ $.Permalink }}"> + {{ end }} {{ .Title }} </a> </h1> @@ -46,7 +54,11 @@ {{ .Summary }} {{ end }} <p> - <a href="{{ .Permalink }}" class="postShorten-excerpt_link link">{{ i18n "post.read_more" }}</a> + {{ with .Params.link }} + <a href="{{ . | absURL }}" class="postShorten-excerpt_link link" target="_blank">{{ i18n "post.read_more" }}</a> + {{ else }} + <a href="{{ $.Permalink }}" class="postShorten-excerpt_link link">{{ i18n "post.read_more" }}</a> + {{ end }} {{ with .Params.readingtime }} <span class="postShorten-readingtime"> {{ printf " - %s min read" . }} |