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

Regis Philibert
23.45.2021 1f11fbe012c8def45b5b9dfa9f6ad4f56b831a97
refs
author Regis Philibert <login@regisphilibert.com>
Thursday, December 23, 2021 21:45 +0100
committer GitHub <noreply@github.com>
Thursday, December 23, 2021 21:45 +0100
commit1f11fbe012c8def45b5b9dfa9f6ad4f56b831a97
tree c94ec6256a51d63bfcc9b5e019205dddbee4f9d8 tree | zip | gz
parent 3b30dfbac339546d9ae6cd185217699f2044b360 view | diff
Featured image detection refactoring: (#462)

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