Merge pull request #837 from tangly1024/fix/search-password

fix/search-password
This commit is contained in:
tangly1024
2023-03-11 10:31:57 +08:00
committed by GitHub

View File

@@ -122,7 +122,8 @@ async function filterByMemCache(allPosts, keyword) {
const articleInfo = post.title + post.summary + tagContent + categoryContent
let hit = articleInfo.toLowerCase().indexOf(keyword) > -1
let indexContent = [post.summary]
if (page && page.block) {
// 防止搜到加密文章的内容
if (page && page.block && !post.password) {
const contentIds = Object.keys(page.block)
contentIds.forEach(id => {
const properties = page?.block[id]?.value?.properties