refactor: optimize multilingual article routing logic, modify slug to abbrlink

This commit is contained in:
radishzzz 2025-03-11 00:34:30 +00:00
parent 16491dae50
commit e5165dd740
16 changed files with 673 additions and 133 deletions

View file

@ -28,7 +28,7 @@ const { Content, remarkPluginFrontmatter } = await post.render()
<article class="heti mb-12.6">
<h1 class="post-title">
<span
transition:name={`post-${post.data.slug || post.slug}`}
transition:name={`post-${post.data.abbrlink || post.slug}`}
data-disable-transition-on-theme
>
{post.data.title}
@ -37,7 +37,7 @@ const { Content, remarkPluginFrontmatter } = await post.render()
<div
class="mb-17 block c-primary font-time"
transition:name={`time-${post.data.slug || post.slug}`}
transition:name={`time-${post.data.abbrlink || post.slug}`}
data-disable-transition-on-theme
>
<time>