mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
13 hours ago ad433679f34ff636f07026d42b21ffeb3dd54e97
refs
author Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
Sunday, May 17, 2026 09:33 +0200
committer GitHub <noreply@github.com>
Sunday, May 17, 2026 09:33 +0200
commitad433679f34ff636f07026d42b21ffeb3dd54e97
tree f5a37cded8e4ad623fa5fe6b66ad0f2c9b8a303b tree | zip | gz
parent 9dc44d5b04092c54a2a16ce03a41423a7a434572 view | diff
fix: support images array for featured image (#967)

## Summary

* Adds `Params.images` fallback support to
`layouts/_partials/func/GetFeaturedImage.html`.
* Keeps `featured_image` as the primary source for backwards
compatibility.
* Uses the first value from `images` when `featured_image` is not set,
matching Hugo's embedded-template image metadata convention.
* Preserves existing Page Resource resolution for exact matches and the
existing `cover`/`feature` page-resource fallback.

## Issue

Closes #77.

## Documentation

Documentation PR: gohugo-ananke/documentation#10

## Verification

* Inspected issue #77 and its comments.
* Checked repository contribution guidance in `CONTRIBUTING.md`.
* Reviewed the existing featured image helper before changing it.
* No local Hugo build was run because the execution container cannot
resolve `github.com` for cloning dependencies.

## Notes

The lookup order after this change is:

1. `featured_image`
2. First value in `images`
3. First page resource containing `feature` or `cover` in its path
1 files modified
28 ■■■■ changed files
layouts/_partials/func/GetFeaturedImage.html 28 ●●●● diff | view | raw | blame | history