Hi Hugo-Users,
I have and idea for a feature I’d like to have / realize: Allowing posts in the list to be showing thumbnail images of embedded images in the posts list view.
That probably eases distinction between different post, but formost is better to look at instead of broken links…
Link to my website repo: strong text
I started out with some code like this ( posts list view of the hugo-book theme) :
{{ define "main" }}
{{ range sort .Paginator.Pages }}
<article class="markdown book-post">
<h2>
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
</h2>
{{ partial "docs/post-meta" . }}
{{ $images := .Resources.ByType "image" }}
{{ if gt (len $images) 0 }}
<div class="thumbnails">
{{ range first 2 $images }}
{{ $thumb := .Fit "200x200" }}
<img src="{{ $thumb.RelPermalink }}" alt="Thumbnail for {{ $.Title }}">
{{ end }}
</div>
{{ end }}
<p>
{{- .Summary -}}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">...</a>
{{ end }}
</p>
</article>
{{ end }}
{{ template "_internal/pagination.html" . }}
{{ end }}
{{ define "toc" }}
{{ partial "docs/taxonomy" . }}
{{ end }}