diff --git a/src/config.yaml b/src/config.yaml index 8dab37cf17..b1920736c9 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -51,6 +51,7 @@ apps: category: isEnabled: true pathname: 'category' # Category main path /category/some-category, you can change this to "group" (/group/some-category) + postsPerPage: 8 robots: index: true diff --git a/src/utils/blog.ts b/src/utils/blog.ts index 9f615ef24d..d2a2edce35 100644 --- a/src/utils/blog.ts +++ b/src/utils/blog.ts @@ -127,6 +127,7 @@ export const blogCategoryRobots = APP_BLOG.category.robots; export const blogTagRobots = APP_BLOG.tag.robots; export const blogPostsPerPage = APP_BLOG?.postsPerPage; +export const categoryBlogPostsPerPage = APP_BLOG?.category.postsPerPage; /** */ export const fetchPosts = async (): Promise> => { @@ -210,7 +211,7 @@ export const getStaticPathsBlogCategory = async ({ paginate }: { paginate: Pagin posts.filter((post) => post.category?.slug && categorySlug === post.category?.slug), { params: { category: categorySlug, blog: CATEGORY_BASE || undefined }, - pageSize: blogPostsPerPage, + pageSize: categoryBlogPostsPerPage || blogPostsPerPage, props: { category: categories[categorySlug] }, } )