mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 23:16:48 +00:00
Merge branch 'main' into deploy/preview.tangly1024.com
This commit is contained in:
@@ -251,7 +251,7 @@ function getCategoryOptions(schema) {
|
||||
* @returns {Promise<{title,description,pageCover,icon}>}
|
||||
*/
|
||||
function getSiteInfo({ collection, block, NOTION_CONFIG, pageId }) {
|
||||
if (!collection || !block || NOTION_CONFIG || pageId) {
|
||||
if (!collection && !block) {
|
||||
return {
|
||||
title: BLOG.TITLE,
|
||||
description: BLOG.DESCRIPTION,
|
||||
@@ -267,8 +267,9 @@ function getSiteInfo({ collection, block, NOTION_CONFIG, pageId }) {
|
||||
: BLOG.DESCRIPTION
|
||||
|
||||
const pageCover = collection?.cover
|
||||
? mapImgUrl(collection?.cover, block[pageId]?.value)
|
||||
? mapImgUrl(collection?.cover, collection, 'collection')
|
||||
: BLOG.HOME_BANNER_IMAGE
|
||||
|
||||
// 用户头像压缩一下
|
||||
let icon = compressImage(
|
||||
collection?.icon
|
||||
|
||||
@@ -53,7 +53,7 @@ function scanSubdirectories(directory) {
|
||||
return subdirectories
|
||||
}
|
||||
|
||||
module.exports = withBundleAnalyzer({
|
||||
const nextConfig = {
|
||||
images: {
|
||||
// 图片压缩
|
||||
formats: ['image/avif', 'image/webp'],
|
||||
@@ -79,12 +79,15 @@ module.exports = withBundleAnalyzer({
|
||||
}
|
||||
]
|
||||
},
|
||||
// 多语言
|
||||
i18n: {
|
||||
defaultLocale: BLOG.LANG.slice(0, 2),
|
||||
// 支持的所有多语言,按需填写即可
|
||||
locales
|
||||
},
|
||||
// 多语言, 在export时禁用
|
||||
i18n:
|
||||
process.env.npm_lifecycle_event === 'export'
|
||||
? undefined
|
||||
: {
|
||||
defaultLocale: BLOG.LANG.slice(0, 2),
|
||||
// 支持的所有多语言,按需填写即可
|
||||
locales
|
||||
},
|
||||
// 重写url
|
||||
async rewrites() {
|
||||
// 处理多语言重定向
|
||||
@@ -180,4 +183,6 @@ module.exports = withBundleAnalyzer({
|
||||
NODE_ENV_API: process.env.NODE_ENV_API || 'prod',
|
||||
THEMES: themes
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = withBundleAnalyzer(nextConfig)
|
||||
|
||||
@@ -521,7 +521,8 @@ summary > .notion-h {
|
||||
}
|
||||
|
||||
.notion-page {
|
||||
width: var(--notion-max-width);
|
||||
/* width: var(--notion-max-width); */
|
||||
width: 100% !important;
|
||||
padding-left: calc(min(12px, 8vw));
|
||||
padding-right: calc(min(12px, 8vw));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user