瀏覽代碼

'index.md配置文件路径调整'

admincjy 1 月之前
父節點
當前提交
1f1d395221
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      .gitignore
  2. 1 1
      server.js

+ 1 - 0
.gitignore

@@ -2,6 +2,7 @@
 # CJYDocs - .gitignore
 # ============================================
 docs/*
+index.md
 node_modules/
 .idea/
 .DS_Store

+ 1 - 1
server.js

@@ -45,7 +45,7 @@ async function getIndexStructure() {
     return indexCache;
   }
 
-  const indexPath = path.join(__dirname, 'docs', 'index.md');
+  const indexPath = path.join(__dirname, 'index.md');
   const content = await fs.readFile(indexPath, 'utf-8');
   indexCache = parseIndexMd(content);
   indexCacheTime = now;