front matter has this resources settings:
resources:
- name: banner
source: /banners/post-ad-example.webp
params:
category: category-name
target_url: /internal-page/
post template code snippet:
{{ with .Resources.Match "banner" }}
<div class="mxd-sidebar mxd-grid-item mxd-post-ad">
<div class="mxd-sidebar__widget radius-m widget-ad">
<a class="widget__image" href="{{ .Params.target_url | default "site.BaseURL"}}" aria-label="{{ .Params.category | default "News" }}">
<img src="{{ .RelPermalink }}" alt="{{ .Params.category | default "News" }}">
</a>
{{ if isset .Params "category" }}
<div class="widget__tags">
<span class="tag tag-default tag-permanent">{{ .Params.category }}</span>
</div>
{{- end }}
</div>
</div>
{{- end }}
Banner images are under /static/banners/
I can not fetch resources set in front matter under resources
How to fix it?