From e123e9b57de65572f6ce9037df92f65e2840edcb Mon Sep 17 00:00:00 2001 From: imparth7 Date: Wed, 11 Sep 2024 21:59:28 +0530 Subject: [PATCH] fix:#7158 issue --- src/utils/rss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/rss.js b/src/utils/rss.js index c6fb8241019..29e5511ea5b 100644 --- a/src/utils/rss.js +++ b/src/utils/rss.js @@ -40,7 +40,7 @@ exports.generateRssFeed = function () { const files = filesByOldest.reverse(); for (const filePath of files) { - const id = filePath.split('/').slice(-1).join(''); + const id = path.basename(filePath); if (id !== 'index.md') { const content = fs.readFileSync(filePath, 'utf-8'); const {data} = matter(content);