Data File resource values returning empty?

Hey there!

I’m ranging through a data file to get author parameters for an author block at the end of an article.

My code on the page is this:

{{ $author := index .Site.Data.authors .Params.author }}

{{- $avatar := resources.Get $author.avatar -}}


<h3>About the Author</h3>
{{ $author.avatar }} - {{ $avatar }}

My goal is the following:

About the Author

/images/author/someGuy.jpg - /images/author/someGuy.jpg

The problem is I’m actually getting:

About the Author

/images/author/someGuy.jpg -

I know that $author.avatar does, in fact, return the URL of the author image, but for some reason I can’t seem to pass that information to resources.Get

I know that the image is there, and the URL passed is correct.

What am I missing?

Nevermind, I’m an idiot. I had my path wrong.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.