diff options
author | Hugo Aguirre <hugo.agmtz@gmail.com> | 2020-10-19 04:22:40 +0300 |
---|---|---|
committer | Hugo Aguirre <hugo.agmtz@gmail.com> | 2020-10-19 04:22:40 +0300 |
commit | 22ba471571f460e14aaa837af1792ff6e9806bb0 (patch) | |
tree | 3ffa12fe3e701bd4c278cdfd737194b03a242c4f | |
parent | a3a61479560039ce64f112943fa54ee162df9105 (diff) |
Get featured image on tag page using page resources
-rw-r--r-- | layouts/taxonomy/tag.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html index 8fb638d..7d12b65 100644 --- a/layouts/taxonomy/tag.html +++ b/layouts/taxonomy/tag.html @@ -12,7 +12,11 @@ <div class="panel panel-default"> {{ if .Params.img }} - <img width="100%" src="{{ .Site.BaseURL }}images/{{ .Params.img }}" alt="{{ .Title }}"> + {{ with .Resources.Match .Params.img }} + {{ range . }} + <img width="100%" src="{{ .RelPermalink }}" alt="{{ .Title }}"> + {{ end }} + {{ end }} {{ else }} <img width="100%" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="{{ .Site.Title }}"> {{ end }} |