Skip to content

Commit

Permalink
1. Upgrade Docusourus to 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouch1978 committed Apr 14, 2024
1 parent fac7142 commit 5876656
Show file tree
Hide file tree
Showing 7 changed files with 16,744 additions and 12,145 deletions.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
},
"dependencies": {
"@babel/plugin-syntax-import-assertions": "^7.20.0",
"@docusaurus/core": "^3.0.1",
"@docusaurus/plugin-google-analytics": "^3.0.1",
"@docusaurus/preset-classic": "^3.0.1",
"@docusaurus/core": "^3.2.1",
"@docusaurus/plugin-google-analytics": "^3.2.1",
"@docusaurus/preset-classic": "^3.2.1",
"@fortawesome/fontawesome-svg-core": "^1.3.0",
"@fortawesome/free-brands-svg-icons": "^6.0.0",
"@fortawesome/free-regular-svg-icons": "^6.0.0",
Expand Down Expand Up @@ -79,8 +79,8 @@
]
},
"devDependencies": {
"@docusaurus/eslint-plugin": "^3.0.1",
"@docusaurus/module-type-aliases": "^3.0.1",
"@docusaurus/eslint-plugin": "^3.2.1",
"@docusaurus/module-type-aliases": "^3.2.1",
"@docusaurus/tsconfig": "3.0.0",
"@docusaurus/types": "3.0.0",
"@types/react": "^18.2.29",
Expand Down
11 changes: 3 additions & 8 deletions src/bin/latestPostsListGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@ function generateLatestPostList(folderPath, filesPattern, outputPath) {
console.log(item);

item.date ??= item.lastUpdatedAt;
item.formattedDate ??= item.formattedLastUpdatedAt;

let tempDate = item.formattedDate.replace('日','');
//Extract year and month from date
const yearMonth = moment(item.date).format("YYYY 年 MM 月");

let indexOfMonth = tempDate.indexOf('月');

let yearMonth = tempDate.substr(0, indexOfMonth + 1);

let day = tempDate.substr(indexOfMonth + 1);
const day = moment(item.date).format("DD");

allItems[item.date] = new Object();
allItems[item.date].title = item.title;
Expand All @@ -47,7 +43,6 @@ function generateLatestPostList(folderPath, filesPattern, outputPath) {
allItems[item.date].date = item.date;
allItems[item.date].yearMonth = yearMonth;
allItems[item.date].day = day;
allItems[item.date].formattedDate = item.formattedDate;
}
});

Expand Down
25 changes: 10 additions & 15 deletions src/components/LatestPosts/latest-blog-posts.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
}
],
"date": "2023-12-12T00:00:00.000Z",
"yearMonth": "2023年12月",
"day": "12",
"formattedDate": "2023年12月12日"
"yearMonth": "2023 年 12 月",
"day": "12"
},
{
"title": "最速搞定 Windows Subsystem for Android 含 Play Store 的懶人包",
Expand All @@ -37,9 +36,8 @@
}
],
"date": "2023-02-11T00:00:00.000Z",
"yearMonth": "2023年2月",
"day": "11",
"formattedDate": "2023年2月11日"
"yearMonth": "2023 年 02 月",
"day": "11"
},
{
"title": "透過 Python 取得 Skype 群組的 ID",
Expand All @@ -60,9 +58,8 @@
}
],
"date": "2022-12-30T00:00:00.000Z",
"yearMonth": "2022年12月",
"day": "30",
"formattedDate": "2022年12月30日"
"yearMonth": "2022 年 12 月",
"day": "30"
},
{
"title": "解決 Python 在 VSCode 中執行時輸出的中文為亂碼的問題",
Expand All @@ -83,9 +80,8 @@
}
],
"date": "2022-12-29T00:00:00.000Z",
"yearMonth": "2022年12月",
"day": "29",
"formattedDate": "2022年12月29日"
"yearMonth": "2022 年 12 月",
"day": "29"
},
{
"title": "啟用 WSL2 下 Ubuntu 的 SSH 遠端連線功能",
Expand All @@ -106,8 +102,7 @@
}
],
"date": "2022-12-07T00:00:00.000Z",
"yearMonth": "2022年12月",
"day": "7",
"formattedDate": "2022年12月7日"
"yearMonth": "2022 年 12 月",
"day": "07"
}
]
35 changes: 15 additions & 20 deletions src/components/LatestPosts/latest-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"permalink": "/docs/tags/docusaurus"
}
],
"date": 1702483200,
"yearMonth": "2023年12月",
"day": "13",
"formattedDate": "2023年12月13日"
"date": 1702483200000,
"yearMonth": "2023 年 12 月",
"day": "14"
},
{
"title": "Markdown 語法小抄",
Expand All @@ -24,10 +23,9 @@
"permalink": "/docs/tags/docusaurus"
}
],
"date": 1678204800,
"yearMonth": "2023年3月",
"day": "7",
"formattedDate": "2023年3月7日"
"date": 1678204800000,
"yearMonth": "2023 年 03 月",
"day": "08"
},
{
"title": "敏捷迭代小遊戲 - 棉花糖挑戰",
Expand All @@ -47,10 +45,9 @@
"permalink": "/docs/tags/小活動"
}
],
"date": 1673971200,
"yearMonth": "2023年1月",
"day": "17",
"formattedDate": "2023年1月17日"
"date": 1673971200000,
"yearMonth": "2023 年 01 月",
"day": "18"
},
{
"title": "敏捷迭代小遊戲 - 傳球遊戲(丁字褲版)",
Expand All @@ -70,10 +67,9 @@
"permalink": "/docs/tags/小活動"
}
],
"date": 1673798400,
"yearMonth": "2023年1月",
"day": "15",
"formattedDate": "2023年1月15日"
"date": 1673798400000,
"yearMonth": "2023 年 01 月",
"day": "16"
},
{
"title": "敏捷迭代小遊戲 - 正三角形",
Expand All @@ -93,9 +89,8 @@
"permalink": "/docs/tags/小活動"
}
],
"date": 1673712000,
"yearMonth": "2023年1月",
"day": "14",
"formattedDate": "2023年1月14日"
"date": 1673712000000,
"yearMonth": "2023 年 01 月",
"day": "15"
}
]
1 change: 1 addition & 0 deletions static/Ads.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google.com, pub-8120664310721472, DIRECT, f08c47fec0942fa0
Loading

0 comments on commit 5876656

Please sign in to comment.