diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-02-05 14:24:24 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-02-05 14:24:24 +0100 |
commit | 15ff0765724c58827be6efa96f06b03b9f1c8cb4 (patch) | |
tree | 4990d0e8f3eb175bd50335ecf639f0dbb4afc9c1 /docs/themes | |
parent | 722086b4ed3e77d1aba6724474bec06d08e7de06 (diff) | |
parent | c305e44f5f081e4436195923a4593e396f07cd49 (diff) |
Merge commit 'c305e44f5f081e4436195923a4593e396f07cd49'
Diffstat (limited to 'docs/themes')
-rw-r--r-- | docs/themes/gohugoioTheme/layouts/news/single.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/themes/gohugoioTheme/layouts/news/single.html b/docs/themes/gohugoioTheme/layouts/news/single.html index 4fef8e74d..33a0043d8 100644 --- a/docs/themes/gohugoioTheme/layouts/news/single.html +++ b/docs/themes/gohugoioTheme/layouts/news/single.html @@ -47,8 +47,13 @@ <div class="fn pl5-l pt3 mid-gray w-100 w-two-third-l sans-serif nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote measure-wide-l"><!-- TODO: Can the content top and the description top line up more precisely, or is just winging it with padding the best we've got? --> {{ with .Params.featured_image_path }} <img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100"> - {{ end }} - + {{ else }} + {{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $featured }} + {{ $featured := .Resize "480x" }} + <img src="{{ $featured.RelPermalink }}" alt="Featured Image for {{ $.Title }}" class="mw-100"> + {{ end }} + {{ end }} {{ .Content }} </div> </div> |