Skip to content

Commit 0a964e9

Browse files
authored
fix: bad tag links in blog preview (#372)
Signed-off-by: Jaime Silvela <[email protected]>
1 parent f3e75ad commit 0a964e9

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed
File renamed without changes.

layouts/blog/list.html

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,26 @@
1414

1515
<!--Image and content preview starts here-->
1616

17-
<a href="{{ .RelPermalink }}">
17+
<div>
1818
<div class="charcoal">
1919
<dl>
20-
<dt class="text-3xl my-5 font-bold">{{ .Title }}</dt>
21-
<div class="flex text-xs gap-1.5">
20+
<dt class="text-3xl my-5 font-bold">
21+
<a href="{{ .RelPermalink }}" class="text-black">{{ .Title }}</a>
22+
</dt>
23+
<dt class="flex text-xs gap-1.5">
2224
<ul class="text-sm">
23-
{{ range .Params.tags }}
24-
<li class="bg-charcoal-opacity-10 py-1 px-2.5 inline-block mr-2 mb-2">{{ . }}</li>
25+
{{ with .GetTerms "tags" }}
26+
{{ range . }}
27+
<li class="bg-charcoal-opacity-10 py-1 px-2.5 inline-block mr-2 mb-2">
28+
<a href="{{ .RelPermalink }}" class="text-black">{{ .LinkTitle }}</a>
29+
</li>
30+
{{ end }}
2531
{{ end }}
2632
</ul>
27-
</div>
28-
<dd class="text-2xl my-5">{{ .Params.summary }}</dd>
33+
</dt>
34+
<dd class="text-2xl my-5">
35+
<a href="{{ .RelPermalink }}" class="text-black">{{ .Params.summary }}</a>
36+
</dd>
2937
</dl>
3038
</div>
3139

@@ -35,7 +43,7 @@
3543
class="bg-rose-600 py-4 px-12 rounded-full text-white text-xl">Continue Reading</a>
3644
</div>
3745
<!--CTA-->
38-
</a>
46+
</div>
3947

4048
<!--Image and content preview ends here-->
4149
</div>

0 commit comments

Comments
 (0)