mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 07:26:46 +00:00
配置整理
This commit is contained in:
@@ -18,7 +18,7 @@ class MyDocument extends Document {
|
||||
<CommonScript />
|
||||
</Head>
|
||||
|
||||
<body className={`${BLOG.font} bg-day dark:bg-night duration-200`}>
|
||||
<body className={`${BLOG.font} bg-day dark:bg-night`}>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
|
||||
@@ -24,8 +24,8 @@ export async function getStaticPaths () {
|
||||
}
|
||||
}
|
||||
|
||||
const from = '[slug-paths'
|
||||
const { allPosts } = await getGlobalNotionData({ from, includePage: false })
|
||||
const from = 'slug-paths'
|
||||
const { allPosts } = await getGlobalNotionData({ from, includePage: true })
|
||||
return {
|
||||
paths: allPosts.map(row => ({ params: { slug: row.slug } })),
|
||||
fallback: true
|
||||
@@ -35,7 +35,7 @@ export async function getStaticPaths () {
|
||||
export async function getStaticProps ({ params: { slug } }) {
|
||||
const from = `slug-props-${slug}`
|
||||
const { allPosts, categories, tags, postCount, latestPosts } =
|
||||
await getGlobalNotionData({ from, includePage: false })
|
||||
await getGlobalNotionData({ from, includePage: true })
|
||||
|
||||
const post = allPosts.find(p => p.slug === slug)
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ const CONFIG_NEXT = {
|
||||
HOME_BANNER_Strings: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '欢迎来到我的博客🎉'], // 首页大图标语文字
|
||||
HOME_BANNER_IMAGE: './bg_image.jpg', // 背景图地址
|
||||
|
||||
NAV_TYPE: 'normal', // ['fixed','autoCollapse','normal'] 分别是固定屏幕顶部、屏幕顶部自动折叠,不固定
|
||||
|
||||
POST_LIST_TYPE: 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载
|
||||
POST_LIST_COVER: false, // 文章列表显示封面图
|
||||
POST_LIST_PREVIEW: true, // 显示文章预览
|
||||
@@ -33,20 +35,8 @@ const CONFIG_NEXT = {
|
||||
|
||||
ARTICLE_SHARE: false, // 文章分享功能
|
||||
ARTICLE_RELATE_POSTS: true, // 相关文章推荐
|
||||
ARTICLE_COPYRIGHT: true, // 文章版权声明
|
||||
ARTICLE_COPYRIGHT: true // 文章版权声明
|
||||
|
||||
NAV_TYPE: 'fixed', // ['fixed','autoCollapse','normal'] 分别是固定屏幕顶部、屏幕顶部自动折叠,不固定
|
||||
|
||||
appearance: 'auto', // ['light', 'dark', 'auto'],
|
||||
font: 'font-serif tracking-wider subpixel-antialiased', // 文章字体 ['font-sans', 'font-serif', 'font-mono'] @see https://www.tailwindcss.cn/docs/font-family
|
||||
lightBackground: '#eeeeee', // use hex value, don't forget '#' e.g #fffefc
|
||||
darkBackground: '#111827', // use hex value, don't forget '#'
|
||||
path: '', // leave this empty unless you want to deploy in a folder
|
||||
since: 2020, // if leave this empty, current year will be used.
|
||||
postListStyle: 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载
|
||||
postsPerPage: 6, // post counts per page
|
||||
sortByDate: false,
|
||||
topNavType: 'normal' // ['fixed','autoCollapse','normal'] 分别是固定顶部、固定底部滑动时自动折叠,不固定
|
||||
}
|
||||
|
||||
export default CONFIG_NEXT
|
||||
|
||||
Reference in New Issue
Block a user