内存全文索引

This commit is contained in:
tangly1024
2022-03-01 16:45:16 +08:00
parent 1b1e0f9211
commit fa67a6c4ed
3 changed files with 19 additions and 23 deletions

View File

@@ -42,10 +42,10 @@ const BlogPostCard = ({ post, showSummary }) => {
</div>
{(!showPreview || showSummary) && <p className='mt-4 mb-24 text-gray-700 dark:text-gray-300 text-sm font-light leading-7'>
{post.summary}
{post.summary && !post.results}
{/* 搜索结果 */}
{post.results && <span className='mt-4 text-gray-700 dark:text-gray-300 text-sm font-light leading-7'>
{post.results.map(r => <span key={r}>...<span dangerouslySetInnerHTML={{ __html: r }}/>...</span>)}
{post.results.map(r => <span key={r}><span dangerouslySetInnerHTML={{ __html: r }}/>...</span>)}
</span>
}