feat: Change links to fulltext when available

This commit is contained in:
Thomas A. Christensen II 2023-04-01 00:23:37 -05:00
parent 50ea4e509c
commit 3f39e92ac5
Signed by: millironx
GPG key ID: 09335146883990B9

View file

@ -30,14 +30,14 @@
alt="Thumbnail of {{ .Title }}"
/>
{{ end }}
<a href="{{ .RelPermalink }}"
><h3 class="card-title">{{ .Title }}</h3></a
>
{{/* Prefer full-text links over local ones */}}
{{ $link := default .RelPermalink (index .Params "link") }}
<a href="{{ $link }}"><h3 class="card-title">{{ .Title }}</h3></a>
<p class="card-text">
{{ .Summary }}
<strong
><small
><a href="{{ .RelPermalink }}">Read more &raquo;</a></small
><a href="{{ $link }}">Read more &raquo;</a></small
></strong
>
</p>