fix: description generation logic

This commit is contained in:
radishzzz 2025-03-24 03:03:11 +00:00
parent f17710bf29
commit bc76861aab
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
---
title: 通用文章 Universal Article
published: 2025-03-24
lang: ''
# lang: ''
---
```markdown

View file

@ -69,6 +69,6 @@ export function generateDescription(
if (post.data.description)
return post.data.description
const lang = post.data.lang ?? defaultLocale
const lang = (!post.data.lang || post.data.lang === '') ? defaultLocale : post.data.lang
return generateExcerpt(post.body, scene, lang)
}