mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-18 04:06:05 +02:00
refactor: optimize multilingual article routing logic, modify slug to abbrlink
This commit is contained in:
parent
16491dae50
commit
e5165dd740
16 changed files with 673 additions and 133 deletions
|
@ -25,7 +25,7 @@ export async function checkSlugDuplication(posts: Post[]): Promise<string[]> {
|
|||
|
||||
posts.forEach((post) => {
|
||||
const lang = post.data.lang || ''
|
||||
const slug = post.data.slug || post.slug
|
||||
const slug = post.data.abbrlink || post.slug
|
||||
|
||||
if (!slugMap.has(lang)) {
|
||||
slugMap.set(lang, new Set())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue