teesloane / firn

Org Mode Static Site Generator
Eclipse Public License 1.0
324 stars 24 forks source link

feature request: show first image on page as thumbnail/preview #95

Closed holtzermann17 closed 2 years ago

holtzermann17 commented 3 years ago

It seems this is a matter of writing a 'partial' but I'm not immediately sure just what it would look like. Here, someone is writing about how they do it in Hugo: https://discourse.gohugo.io/t/display-first-image-in-post-in-link-preview/10541/2

Sample page with an image on it:

https://exp2exp.github.io/writers_workshop

Reposted in Discord, no preview shows up (that's expected at the moment, but the feature request would be to generate a preview):

Screenshot from 2021-04-17 15-34-54

teesloane commented 3 years ago

Yep, this could be done with a partial. I think this is a bit adjacent to Firn so I wouldn't add it to the docs, but for the most part, I think the process would look like this:

Let me know if this works.