-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能否在搜索功能中增加关键词 #81
Comments
我看他的代码是
//ejs文件 <% site.posts.forEach(function(post, i){ %> <% if (post.hidden === true) { return true } %> <a <% if(post.top){%>id="top"<%}%> class="<%= __('all_articles') %> <% post.categories.forEach(function(category, i){ %><%=category.name%> <% }) %>" href="<%- url_for(post.path) %>" data-tag="<% post.tags.forEach(function(tag, i){ %><%=tag.name%><% if (i+1<post.tags.length){%>,<%}})%>" data-author="<% if(theme.author && theme.author.on==true && post.author) {%><%=post.author %><%}%>" > <%=post.title %> <%= date(post.date, 'YYYY/MM/DD') %> <% }) %>
|
/根据搜索条件,过滤文章列表/
} |
也许你可以按照 #82 的建议,在你的 |
因为我的Hexo文章的头文件里面一般是有tags的,是否能增加关键词搜索功能呢?比如在搜索框内输入
“tags 数据结构”
就是要搜索全部带“数据结构”tags的文章呢?
效果如https://github.com/yelog/hexo-theme-3-hexo
The text was updated successfully, but these errors were encountered: