fix: use tag name for display in tags page (#438)

Instead of slugified tags, original tag names will
be used for displaying tag names in the tags page.
This commit is contained in:
George Zhao
2025-02-08 12:46:16 +08:00
committed by satnaing
parent 26020bbd0e
commit a56b28bc2c
3 changed files with 12 additions and 13 deletions
+8 -10
View File
@@ -77,7 +77,9 @@ const nextPost =
</button>
</div>
<main id="main-content">
<h1 transition:name={slugifyStr(title)} class="post-title inline-block">{title}</h1>
<h1 transition:name={slugifyStr(title)} class="post-title inline-block">
{title}
</h1>
<Datetime
pubDatetime={pubDatetime}
modDatetime={modDatetime}
@@ -91,7 +93,7 @@ const nextPost =
</article>
<ul class="my-8">
{tags.map(tag => <Tag tag={slugifyStr(tag)} />)}
{tags.map(tag => <Tag tag={slugifyStr(tag)} tagName={tag} />)}
</ul>
<div
@@ -134,10 +136,8 @@ const nextPost =
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-left flex-none"
>
<>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M15 6l-6 6l6 6" />
</>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M15 6l-6 6l6 6" />
</svg>
<div>
<span>Previous Post</span>
@@ -168,10 +168,8 @@ const nextPost =
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-right flex-none"
>
<>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M9 6l6 6l-6 6" />
</>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M9 6l6 6l-6 6" />
</svg>
</a>
)