Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bul-ikana/hugo-cards.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Aguirre <hugo.agmtz@gmail.com>2020-10-19 04:22:40 +0300
committerHugo Aguirre <hugo.agmtz@gmail.com>2020-10-19 04:22:40 +0300
commit22ba471571f460e14aaa837af1792ff6e9806bb0 (patch)
tree3ffa12fe3e701bd4c278cdfd737194b03a242c4f
parenta3a61479560039ce64f112943fa54ee162df9105 (diff)
Get featured image on tag page using page resources
-rw-r--r--layouts/taxonomy/tag.html6
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 }}