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

Regis Philibert
23.42.2021 718a85aaf663a6b90f8a344e91f72a77c406ba06
refs
author Regis Philibert <login@regisphilibert.com>
Thursday, December 23, 2021 21:42 +0100
committer Regis Philibert <login@regisphilibert.com>
Thursday, December 23, 2021 21:42 +0100
commit718a85aaf663a6b90f8a344e91f72a77c406ba06
tree c94ec6256a51d63bfcc9b5e019205dddbee4f9d8 tree | zip | gz
parent 3b30dfbac339546d9ae6cd185217699f2044b360 view | diff
Featured image detection refactoring:

We look for .Params.featured_image
If found > we use that as URL
If we find a Page resource matching the value of the above, we use its .RelPermalink
If none of the above we look for an resource whose filepath contains `featured` or `cover` and use its .RelPermalink if found

Fixes #233
Fixes #407
2 files modified
38 ■■■■■ changed files
README.md 4 ●●●● diff | view | raw | blame | history
layouts/partials/func/GetFeaturedImage.html 34 ●●●●● diff | view | raw | blame | history