mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
fix: slugify supports better acronyms and preserve non-latin char (#606)
* fix: slugify supports better acronyms and preserve non-latin char Update slugify function to handle better acronyms and preserve non-latin characters. - uses slugify (simov) for Latin-only strings to fix acronym issue (eg: e2e-testing) - uses lodash.kebabcase for strings with non-latin characters to preserve them * fix: remove dots in slugified titles for view transitions Fixes #584
This commit is contained in:
@@ -22,7 +22,9 @@ const { title, description, ...props } = data;
|
||||
"focus-visible:no-underline focus-visible:underline-offset-0",
|
||||
]}
|
||||
>
|
||||
<Heading style={{ viewTransitionName: slugifyStr(title) }}>
|
||||
<Heading
|
||||
style={{ viewTransitionName: slugifyStr(title.replaceAll(".", "-")) }}
|
||||
>
|
||||
{title}
|
||||
</Heading>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user