Skip to content

Conversation

@Schallbert
Copy link

@Schallbert Schallbert commented Nov 16, 2025

Why this change?

Some people like me use themes where the image key in a post's front matter is either already taken (e.g. for a banner image) or unused.

Some themes like the one I use (minimal mistakes) has a different way of organizing a post's frontmatter like header.teaser.

This PR should solve this issue with a customizable key: thumb_path_key can be set in _config.yml and will point the liquid template to the correct thumbnail image path.

This can help deduplicate front matter information.

What else I touched

- I have reorganized the generator's code just a bit so its main routine looks shorter for readability.

  • In the liquid template, thumb_path_key is evaluated and split to allow for higher nesting depths in the front matter like header.teaser
  • I updated the affected readme section with examples, might be a bit lengthy now.

Still this change keeps backwards compatibility due to default values for image and image.path.

Testing

  • add tests for changes in feed.xml
  • add tests for the updated .rb paths

@Schallbert Schallbert changed the title Add user customization to image key for thumbnails/images Make image key configurable for thumbnails/images Nov 16, 2025
- exchanged image.path and image defaults
@parkr
Copy link
Member

parkr commented Nov 17, 2025

Thanks for the PR! It's generally good hygiene to keep each PR narrowly focused. Would you mind pulling your refactor into a separate PR? Anything directly related to the image path change is fine to stay.

@Schallbert
Copy link
Author

OK, will do.
I'll also write some tests for the new behavior.

@parkr
Copy link
Member

parkr commented Nov 18, 2025

Thank you!

@Schallbert
Copy link
Author

I hope we should be good to go now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants