Merge branch 'main' into feature/user-auth-clerk

This commit is contained in:
tangly1024.com
2024-09-23 14:09:13 +08:00
118 changed files with 4896 additions and 1387 deletions

View File

@@ -15,7 +15,7 @@ const themes = scanSubdirectories(path.resolve(__dirname, 'themes'))
const locales = (function () {
// 根据BLOG_NOTION_PAGE_ID 检查支持多少种语言数据.
// 支持如下格式配置多个语言的页面id xxx,zh:xxx,en:xxx
let langs = [BLOG.LANG.slice(0, 2)]
const langs = [BLOG.LANG.slice(0, 2)]
if (BLOG.NOTION_PAGE_ID.indexOf(',') > 0) {
const siteIds = BLOG.NOTION_PAGE_ID.split(',')
for (let index = 0; index < siteIds.length; index++) {
@@ -33,6 +33,7 @@ const locales = (function () {
})()
// 编译前执行
// eslint-disable-next-line no-unused-vars
const preBuild = (function () {
if (
!process.env.npm_lifecycle_event === 'export' &&
@@ -84,6 +85,7 @@ const nextConfig = {
ignoreDuringBuilds: true
},
output: process.env.EXPORT ? 'export' : undefined,
staticPageGenerationTimeout: 120,
// 多语言, 在export时禁用
i18n: process.env.EXPORT
? undefined