修复部分NOTION_CONFIG读取问题

This commit is contained in:
tangly1024.com
2024-05-15 14:55:14 +08:00
parent 70e53649b3
commit 517a967640
44 changed files with 911 additions and 565 deletions

View File

@@ -11,10 +11,10 @@ import BlogItem from './BlogItem'
*/
export const BlogListPage = props => {
const { page = 1, posts, postCount } = props
const { locale } = useGlobal()
const { locale, NOTION_CONFIG } = useGlobal()
const router = useRouter()
const totalPage = Math.ceil(
postCount / parseInt(siteConfig('POSTS_PER_PAGE'))
postCount / siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
)
const currentPage = +page