2 Commits

Author SHA1 Message Date
Steven G. Harms
0f40733d46 Changes .GetMatch Pattern to find bundled assets
When I attempted to use `func/GetFeaturedImage.html`, it did not find my resource, `images/foo-cover.webp`. Updating the match syntax to the pattern expressed here, provided expected behavior:

Per:

https://gohugo.io/content-management/page-resources/#pattern-matching

> .Resources.Match "*sunset.jpg" 🚫

and...

> .Resources.Match "*" 🚫

Are not expected to work

> .Resources.Match "**/sunset.jpg" 

which follows this change, does.
2021-03-29 07:11:56 -04:00
Sean
5001b28387
Add automatic cover image support (#303)
* Add support for auto-detection of featured images.

* Rename Partial, Add Documentation

Renamed the partial to func/GetFeaturedImage.html.

Additionally added more documentation in the partial to explain how it
worked, and what values were returned.

Co-authored-by: Sean Zimmermann <sz2243@columbia.edu>
2020-06-23 09:34:09 -04:00