修复404跳转bug

This commit is contained in:
tangly1024
2022-04-13 13:05:20 +08:00
parent b122bab41d
commit f1a29575bd
14 changed files with 78 additions and 37 deletions

View File

@@ -7,9 +7,8 @@ const Index = props => {
const { keyword, siteInfo } = props
const { locale } = useGlobal()
const meta = {
title: `${keyword || ''}${keyword ? ' | ' : ''}${locale.NAV.SEARCH} | ${
siteInfo.title
}`,
title: `${keyword || ''}${keyword ? ' | ' : ''}${locale.NAV.SEARCH} | ${siteInfo.title
}`,
description: siteInfo.title,
slug: 'search/' + (keyword || ''),
type: 'website'
@@ -111,7 +110,7 @@ async function filterByMemCache(allPosts, keyword) {
indexContent = appendText(indexContent, properties, 'caption')
})
}
// console.log('搜索是否命中缓存', page !== null, indexContent)
console.log('搜索是否命中缓存', page !== null, indexContent)
post.results = []
let hitCount = 0
for (const i in indexContent) {