hugo-profile icon indicating copy to clipboard operation
hugo-profile copied to clipboard

Frontmatter images conflicts with Hugo definition

Open adyanth opened this issue 10 months ago • 2 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 https://github.com/gurusabarish/hugo-profile/blob/4687d533368288e9f71d358dca30099f29535531/layouts/_default/gallery.html#L22 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 {{ . }}.

adyanth avatar Apr 19 '24 18:04 adyanth

On second look, this was modified in behavior with https://github.com/gurusabarish/hugo-profile/commit/0c564693b306ae4fa629ef68f72a2cefa840f0fa

adyanth avatar Apr 19 '24 18:04 adyanth

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

adyanth avatar Apr 19 '24 18:04 adyanth

@adyanth new tag released.

https://github.com/gurusabarish/hugo-profile/releases/tag/v4.051

gurusabarish avatar Jun 15 '24 13:06 gurusabarish