瀏覽代碼

fix: insight search plugin site root issue

ppoffice 9 年之前
父節點
當前提交
c3cf7c52e9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      layout/search/insight.ejs

+ 1 - 1
layout/search/insight.ejs

@@ -49,7 +49,7 @@
                     sectionTitle = type == 'POSTS' ? '<%= __("insight.posts") %>' : '<%= __("insight.pages") %>';
                     $searchItems = array.map(function (item) {
                         // Use config.root instead of permalink to fix url issue
-                        return searchItem('file', item.title, null, item.text.slice(0, 150), <%= config.root %> + item.path);
+                        return searchItem('file', item.title, null, item.text.slice(0, 150), '<%= config.root %>' + item.path);
                     });
                     break;
                 case 'CATEGORIES':