diff --git a/gulpfile.js b/gulpfile.js index a6c835a..567f5e4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -149,7 +149,7 @@ function createIndex(path, statsSync) { "mod": "${statsSync.trim()}", "tag": "${tag}", "tagId": "${h.getAttribute('id')}", - "path": "/${urlPath.replace('.md', '.html')}" + "path": "/${urlPath.replace(new RegExp(/(index\.(html|md)|\.(html|md))/), '')}" },` searchDict[title+urlPath] = true }