gurusabarish / hugo-profile

A highly customizable and mobile first Hugo template for personal portfolio and blog.

Home Page:https://hugo-profile.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontmatter images conflicts with Hugo definition

adyanth opened this issue · comments

Describe the bug
Markdown pages fail to build with images: set in the front matter.

To Reproduce
Steps to reproduce the behavior:

  1. Add front matter to markdown with
images:
  - src: /test.jpg
  1. Fails to build

Expected behavior
Expect to build

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [e.g. iOS] Any
  • Browser [e.g. chrome, safari] Any
  • Version [e.g. 22] Any
  • Theme: v4.0.5

Additional context

<img class="w-100" height="280px" src="{{ .src }}">

This uses a .src on the images array, whereas the Hugo definition for front matter images only includes images as []string which makes it conflicting. If Hugo does not error, the theme errors and vice versa.

Fix would be to change it to {{ . }}.

On second look, this was modified in behavior with 0c56469

But this is not released as a tag. Will keep this issue open.