diff --git a/public/article-2025/05/react/article-en.md b/public/article-2025/05/react/article-en.md index b5ad7aa..a4afa28 100644 --- a/public/article-2025/05/react/article-en.md +++ b/public/article-2025/05/react/article-en.md @@ -1,6 +1,3 @@ -Below is the English translation of the provided Markdown blog post about React.js: - - --- title: About React.js date: "2025-05-09" diff --git a/src/app/article/article.tsx b/src/app/article/article.tsx index 6ffeac0..d4285b7 100644 --- a/src/app/article/article.tsx +++ b/src/app/article/article.tsx @@ -28,7 +28,7 @@ export function getArticleIndexes() { return true; }); - const articles = years.flatMap((year) => { + const articles = years.reverse().flatMap((year) => { const yearPath = path.join(postsDirectory, year); const months = fs.readdirSync(yearPath).filter((month) => { const monthPath = path.join(yearPath, month); @@ -37,7 +37,7 @@ export function getArticleIndexes() { return false; }); - return months.flatMap((month) => { + return months.reverse().flatMap((month) => { const monthPath = path.join(yearPath, month); const articleIds = fs.readdirSync(monthPath).filter((articleId) => { const articlePath = path.join(monthPath, articleId); @@ -45,7 +45,7 @@ export function getArticleIndexes() { return true; }); - return articleIds + return articleIds.reverse() .map((articleId) => { const articleDir = path.join(monthPath, articleId); const articleFiles = fs @@ -86,7 +86,6 @@ export function getArticleIndexes() { .flat(); // ネストされた配列を平坦化 }); }); - articles.reverse(); return articles; } function findThumbnailFile(directory: string): string | null {