主题配置文件Notion化

This commit is contained in:
tangly1024.com
2023-11-07 14:52:21 +08:00
parent e084053098
commit f2e2ae8d5f
118 changed files with 570 additions and 528 deletions

View File

@@ -2,6 +2,7 @@ import NavPostListEmpty from './NavPostListEmpty'
import { useRouter } from 'next/router'
import NavPostItem from './NavPostItem'
import CONFIG from '../config'
import { siteConfig } from '@/lib/config'
/**
* 博客列表滚动分页
@@ -19,7 +20,7 @@ const NavPostList = (props) => {
let existingGroup = null
// 开启自动分组排序
if (JSON.parse(CONFIG.AUTO_SORT)) {
if (JSON.parse(siteConfig('GITBOOK_AUTO_SORT', true, CONFIG))) {
existingGroup = groups.find(group => group.category === categoryName) // 搜索同名的最后一个分组
} else {
existingGroup = groups[groups.length - 1] // 获取最后一个分组