diff --git a/src/components/ArticleList.astro b/src/components/ArticleList.astro deleted file mode 100644 index 1e7004f..0000000 --- a/src/components/ArticleList.astro +++ /dev/null @@ -1,31 +0,0 @@ ---- -import { getCollection } from 'astro:content'; -import type { CollectionEntry } from 'astro:content'; - -// 获取所有文章,并按日期排序 -const articles: CollectionEntry<'articles'>[] = await getCollection('articles'); -const sortedArticles = articles.sort( - (a, b) => b.data.date.getTime() - a.data.date.getTime() -); ---- -
{article.data.date.toLocaleDateString('zh-CN')}
- {article.data.summary &&{article.data.summary}
} - {article.data.tags && ( -- {extractSummary(articleWithSpecialPath.body)} -
- )} -ID: {articleId}
-+