Forráskód Böngészése

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

admincjy 1 hónapja
szülő
commit
1f1d395221
2 módosított fájl, 2 hozzáadás és 1 törlés
  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;