Skip to content

Commit d418485

Browse files
authored
fix:#7158 issue (#7159)
1 parent 6d2f337 commit d418485

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/rss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exports.generateRssFeed = function () {
4040
const files = filesByOldest.reverse();
4141

4242
for (const filePath of files) {
43-
const id = filePath.split('/').slice(-1).join('');
43+
const id = path.basename(filePath);
4444
if (id !== 'index.md') {
4545
const content = fs.readFileSync(filePath, 'utf-8');
4646
const {data} = matter(content);

0 commit comments

Comments
 (0)