Replies: 1 comment
-
你生成的 search.xml 得有文章的 author和tag |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
您好!我要修改的文件是themes/butterfly/source/js/search/local-search.js
我的理解是,其中您定义data变量用来存放搜索的结果,包括title、content、url三种方法
data = [...a.querySelectorAll('entry')].map(item =>{
return {
title: item.querySelector('title').textContent,
content: item.querySelector('content') && item.querySelector('content').textContent,
url: item.querySelector('url').textContent
}
})
我的疑问是,如果我要搜索文章的author和tag,怎么增加这两个方法呢?
Beta Was this translation helpful? Give feedback.
All reactions