Skip to content

Question: Post image from Hugo page resources #293

@davidsneighbour

Description

@davidsneighbour

I am using Frontmatter in connection with Hugo and wonder if it's possible to somehow use images as article image on the dashboard when they are defined in the resources section of the frontmatter.

frontmatter sample

---
...
resources:
  - title: "caption"
    id: "id1"
    src: "header.jpg"
  - title: "caption2"
    id: "id2"
    src: "header2.jpg"
---

I would expect the solution to show the image of the first resource (header.jpg). This can of course be "hacked" by adding an additional frontmatter item with the header image, but that would not be used in the theme at all and only for Frontmatter to look nice.

Page Resources is a fairly integral piece of Hugos page bundle system. This would have to check if the first item is an actual image though, because other media types could take that place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions