Skip to content

Commit 5110391

Browse files
authored
🚑️ Fix category and tag pages
Close #477
1 parent c54dfda commit 5110391

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

layouts/_default/taxonomy.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,24 @@ <h2 class="text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:te
44

55
<div class="mt-10 space-y-4 border-t border-gray-200 pt-10 sm:mt-16 sm:pt-16">
66

7-
{{ .Content }}
8-
97
<ul role="list" class="divide-y divide-gray-100 overflow-hidden bg-white shadow-xs ring-1 ring-gray-900/5 sm:rounded-xl">
10-
{{- range .Data.Terms.ByCount }}
8+
{{- range .Pages }}
119
<li class="relative flex justify-between gap-x-6 px-4 py-5 hover:bg-gray-50 sm:px-6">
1210
<div class="flex min-w-0 gap-x-4">
1311
<div class="min-w-0 flex-auto">
1412
<p class="text-sm/6 font-semibold text-gray-900">
15-
<a href="{{ .Page.RelPermalink }}">
13+
<a href="{{ .RelPermalink }}">
1614
<span class="absolute inset-x-0 -top-px bottom-0"></span>
17-
{{ .Page.LinkTitle }}
15+
{{ .LinkTitle }}
1816
</a>
1917
</p>
2018
<p class="mt-1 flex text-xs/5 text-gray-500 gap-x-2">
2119
{{ i18n "lastupdate" }}:
22-
<time datetime="{{ .Page.Lastmod }}">{{ .Page.Lastmod | time.Format ":date_medium" }}</time>
20+
<time datetime="{{ .Lastmod }}">{{ .Lastmod | time.Format ":date_medium" }}</time>
2321
</p>
2422
</div>
2523
</div>
2624
<div class="flex shrink-0 items-center gap-x-4">
27-
<div class="hidden sm:flex sm:flex-col sm:items-end">
28-
<p class="text-sm/6 text-gray-900">
29-
<span class="inline-flex items-center rounded-full bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600">{{ .Count }}</span>
30-
</p>
31-
</div>
3225
<svg class="size-5 flex-none text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon">
3326
<path fill-rule="evenodd" d="M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
3427
</svg>

layouts/posts/section.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ <h2 class="text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:te
3131
{{- end }}
3232
{{- with .Params.categories }}
3333
{{- range . }}
34-
<a href="{{ " /categories" | relLangURL }}/{{ . | urlize }}"
34+
<a href="{{ "/categories" | relLangURL }}/{{ . | urlize }}.html"
3535
class="inline-flex items-center rounded-full bg-indigo-50 px-2 py-1 text-xs font-medium text-indigo-700 ring-1 ring-inset ring-indigo-500/10 hover:bg-indigo-100">{{
3636
. }}</a>
3737
{{- end }}
3838
{{- end }}
3939
{{- with .Params.tags }}
4040
{{- range . }}
41-
<a href="{{ " /tags" | relLangURL }}/{{ . | urlize }}"
41+
<a href="{{ "/tags" | relLangURL }}/{{ . | urlize }}.html"
4242
class="inline-flex items-center rounded-full bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 hover:bg-gray-100">{{
4343
. }}</a>
4444
{{- end }}

0 commit comments

Comments
 (0)