Skip to content

Commit 973bc60

Browse files
committed
chore: 只留下英文
1 parent 909c503 commit 973bc60

File tree

321 files changed

+130
-17625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+130
-17625
lines changed

components/blog-index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function BlogIndex({ more = "Read more" }) {
2525

2626
return (
2727
<div className="py-10 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
28-
{filterRouteLocale(getPagesUnderRoute("/blog"), locale, defaultLocale)
28+
{getPagesUnderRoute("/blog")
2929
.sort((a, b) => {
3030
const dateA = parseDate(a.frontMatter?.date);
3131
const dateB = parseDate(b.frontMatter?.date);

middleware.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

next-sitemap.config.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ module.exports = {
66

77
transform: async (config, path) => {
88
// 提取语言代码
9-
const langMatch = path.match(/\.(en-US|ja-JP|zh-CN)$/);
10-
if (langMatch) {
11-
const lang = langMatch[1];
12-
// 移除路径末尾的语言代码
13-
const newPath = path.replace(`.${lang}`, "");
14-
// 构建新的 URL 格式
15-
return {
16-
loc: `/${lang}${newPath}`,
17-
changefreq: config.changefreq,
18-
priority: config.priority,
19-
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
20-
};
21-
}
9+
// const langMatch = path.match(/\.(en-US|ja-JP|zh-CN)$/);
10+
// if (langMatch) {
11+
// const lang = langMatch[1];
12+
// // 移除路径末尾的语言代码
13+
// const newPath = path.replace(`.${lang}`, "");
14+
// // 构建新的 URL 格式
15+
// return {
16+
// loc: `/${lang}${newPath}`,
17+
// changefreq: config.changefreq,
18+
// priority: config.priority,
19+
// lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
20+
// };
21+
// }
2222
// 对于没有语言代码的路径,保持原样
2323
return {
2424
loc: path,

next.config.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,14 @@ const withNextra = require("nextra")({
55
});
66

77
module.exports = withNextra({
8-
basePath: "/resources", // 添加这一行
9-
10-
i18n: {
11-
locales: ["zh-CN", "en-US", "ja-JP"],
12-
defaultLocale: "en-US",
13-
},
14-
redirects: () => {
8+
basePath: "/resources",
9+
async redirects() {
1510
return [
1611
{
1712
source: "/",
18-
destination: "/resources",
19-
statusCode: 301,
20-
},
21-
{
22-
source: "/resources",
2313
destination: "/docs/start-guide/getting-started",
24-
statusCode: 301,
14+
permanent: true,
2515
},
2616
];
2717
},
28-
});
18+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "npm run build && npm run start",
1010
"deploy": "PORT=3099 npm run start ",
1111
"clean": "rimraf .next",
12-
"sitemap": "next-sitemap"
12+
"postbuild": "next-sitemap"
1313
},
1414
"repository": {
1515
"type": "git",

pages/404.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
import { useEffect } from 'react'
3+
import { useRouter } from 'next/router'
4+
5+
export default function Custom404() {
6+
const router = useRouter()
7+
8+
useEffect(() => {
9+
router.push('/docs/start-guide/getting-started')
10+
}, [])
11+
12+
return null
13+
}

pages/_meta.ja-JP.json

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.

pages/_meta.zh-CN.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

pages/blog.ja-JP.mdx

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)