gitbook 适配algolia

This commit is contained in:
tangly1024.com
2024-02-21 13:49:52 +08:00
parent 140c15727e
commit 29407c1b0d
4 changed files with 33 additions and 21 deletions

View File

@@ -20,7 +20,7 @@ const NavPostList = (props) => {
let existingGroup = null
// 开启自动分组排序
if (JSON.parse(siteConfig('GITBOOK_AUTO_SORT', true, CONFIG))) {
if (siteConfig('GITBOOK_AUTO_SORT', true, CONFIG)) {
existingGroup = groups.find(group => group.category === categoryName) // 搜索同名的最后一个分组
} else {
existingGroup = groups[groups.length - 1] // 获取最后一个分组