Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions public/article-2025/05/react/article-en.md
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
7 changes: 3 additions & 4 deletions src/app/article/article.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -37,15 +37,15 @@ 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);
if (!fs.statSync(articlePath).isDirectory()) return false; // ファイルの場合はスキップ
return true;
});

return articleIds
return articleIds.reverse()
.map((articleId) => {
const articleDir = path.join(monthPath, articleId);
const articleFiles = fs
Expand Down Expand Up @@ -86,7 +86,6 @@ export function getArticleIndexes() {
.flat(); // ネストされた配列を平坦化
});
});
articles.reverse();
return articles;
}
function findThumbnailFile(directory: string): string | null {
Expand Down