feat(list): ability to show article tags on homepage (#1270)
* feat(list): ability to show article tags on homepage closes https://github.com/CaiJimmy/hugo-theme-stack/issues/880 * Disable showTags by default
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
{{- $IsList := .IsList -}}
|
||||
{{- $Page := .Page -}}
|
||||
<header class="article-header">
|
||||
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
|
||||
{{- $image := partial "helper/image" (dict "Image" $Page.Params.image "Resources" $Page.Resources) -}}
|
||||
{{ if $image }}
|
||||
<div class="article-image">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<a href="{{ $Page.RelPermalink }}">
|
||||
<img src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" loading="lazy"
|
||||
alt="Featured image of post {{ .Title }}" />
|
||||
alt="Featured image of post {{ $Page.Title }}" />
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ partialCached "article/components/details" . .RelPermalink }}
|
||||
{{ partial "article/components/details" (dict "Page" $Page "IsList" $IsList) }}
|
||||
</header>
|
||||
Reference in New Issue
Block a user