Hi, new Hugoers here.
I’m very new to Hugo please forgive for any of my mistakes.
So, I am following this blog https://www.netlify.com/blog/2018/07/24/hugo-tips-how-to-create-author-pages/ to create authors using taxonomies and add the front matter of ‘photo’ for each one of them which I did it locally (img/author_photo.png) unlike the tutorial (www.something.com/myphoto.png) in the link given.
[Problem]
I am trying to add the corresponding photo to each author in the posts they wrote. I managed to get the img/author_photo.png through {{ .Params.photo }} but the link somehow becomes like this //exampledomain/page/authors/zaimazhar97/_index.mdimg/zaimazhar97.png … I am trying to reach the author’s photo at //exampledomain/authors/zaimazhar97/img/zaimazhar97.png
The code for the link I am trying to generate dynamically…
{{- range .Params.authors }}
{{ with $.Site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .)) }}
<figure>
<img width="100px" src="{{ $.Site.BaseURL}}{{ ( printf (urlize .)) }}{{ .Params.photo }}" alt=""/
</figure>
{{ end }}
<span style="font-size: 1em;"><a href="{{ $.Site.BaseURL}}{{printf "authors/"}}{{ . | urlize}}">{{ . }}</a></span>
{{{ end }}}
Thank you.