[fix] skip_search is not iterable (#526)
This commit is contained in:
parent
b558afd782
commit
bc5760aadb
|
@ -75,7 +75,7 @@ hexo.extend.generator.register('search_json_generator', function (locals) {
|
|||
posts.each(function(post) {
|
||||
var layout_list = ["post"]
|
||||
if (!layout_list.includes(post.layout)) return
|
||||
if (matchAndExit(post.path, cfg.skip_search)) return
|
||||
if (cfg.skip_search && matchAndExit(post.path, cfg.skip_search)) return
|
||||
if (post.indexing == false) return
|
||||
let temp_post = generateJson(post)
|
||||
res.push(temp_post)
|
||||
|
@ -85,7 +85,7 @@ hexo.extend.generator.register('search_json_generator', function (locals) {
|
|||
pages.each(function(page) {
|
||||
var layout_list = ["page", "wiki"]
|
||||
if (!layout_list.includes(page.layout)) return
|
||||
if (matchAndExit(page.path, cfg.skip_search)) return
|
||||
if (cfg.skip_search && matchAndExit(page.path, cfg.skip_search)) return
|
||||
if (page.indexing == false) return
|
||||
let temp_post = generateJson(page)
|
||||
res.push(temp_post)
|
||||
|
|
Loading…
Reference in New Issue