mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 07:26:47 +00:00
搜索忽略大小写
This commit is contained in:
@@ -120,7 +120,7 @@ async function filterByMemCache(allPosts, keyword) {
|
|||||||
const tagContent = post.tags && Array.isArray(post.tags) ? post.tags.join(' ') : ''
|
const tagContent = post.tags && Array.isArray(post.tags) ? post.tags.join(' ') : ''
|
||||||
const categoryContent = post.category && Array.isArray(post.category) ? post.category.join(' ') : ''
|
const categoryContent = post.category && Array.isArray(post.category) ? post.category.join(' ') : ''
|
||||||
const articleInfo = post.title + post.summary + tagContent + categoryContent
|
const articleInfo = post.title + post.summary + tagContent + categoryContent
|
||||||
let hit = articleInfo.indexOf(keyword) > -1
|
let hit = articleInfo.toLowerCase().indexOf(keyword) > -1
|
||||||
let indexContent = [post.summary]
|
let indexContent = [post.summary]
|
||||||
if (page && page.block) {
|
if (page && page.block) {
|
||||||
const contentIds = Object.keys(page.block)
|
const contentIds = Object.keys(page.block)
|
||||||
|
|||||||
Reference in New Issue
Block a user