mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-31 15:10:11 +00:00
主题分页相关调整
This commit is contained in:
@@ -71,7 +71,7 @@ export async function getStaticPaths() {
|
||||
// 处理文章页数
|
||||
const postCount = categoryPosts.length
|
||||
const totalPages = Math.ceil(
|
||||
postCount / siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
|
||||
postCount / siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG)
|
||||
)
|
||||
if (totalPages > 1) {
|
||||
for (let i = 1; i <= totalPages; i++) {
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function getStaticPaths({ locale }) {
|
||||
const from = 'page-paths'
|
||||
const { postCount, NOTION_CONFIG } = await getGlobalData({ from, locale })
|
||||
const totalPages = Math.ceil(
|
||||
postCount / siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
|
||||
postCount / siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG)
|
||||
)
|
||||
return {
|
||||
// remove first page, we 're not gonna handle that.
|
||||
|
||||
@@ -27,7 +27,6 @@ export const getServerSideProps = async ctx => {
|
||||
'Cache-Control',
|
||||
'public, max-age=3600, stale-while-revalidate=59'
|
||||
)
|
||||
console.log('fff', fields)
|
||||
return getServerSideSitemap(ctx, fields)
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export async function getStaticPaths() {
|
||||
// 处理文章页数
|
||||
const postCount = tagPosts.length
|
||||
const totalPages = Math.ceil(
|
||||
postCount / siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
|
||||
postCount / siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG)
|
||||
)
|
||||
if (totalPages > 1) {
|
||||
for (let i = 1; i <= totalPages; i++) {
|
||||
|
||||
Reference in New Issue
Block a user