mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 07:26:50 +00:00
gitbook导航文件夹悬停自动展开
This commit is contained in:
@@ -105,6 +105,7 @@ function groupArticles(filteredNavPages) {
|
||||
return []
|
||||
}
|
||||
const groups = []
|
||||
const AUTO_SORT = siteConfig('GITBOOK_AUTO_SORT', true, CONFIG)
|
||||
|
||||
for (let i = 0; i < filteredNavPages.length; i++) {
|
||||
const item = filteredNavPages[i]
|
||||
@@ -112,7 +113,7 @@ function groupArticles(filteredNavPages) {
|
||||
|
||||
let existingGroup = null
|
||||
// 开启自动分组排序;将同分类的自动归到同一个文件夹,忽略Notion中的排序
|
||||
if (siteConfig('GITBOOK_AUTO_SORT', true, CONFIG)) {
|
||||
if (AUTO_SORT) {
|
||||
existingGroup = groups.find(group => group.category === categoryName) // 搜索同名的最后一个分组
|
||||
} else {
|
||||
existingGroup = groups[groups.length - 1] // 获取最后一个分组
|
||||
|
||||
Reference in New Issue
Block a user