Skip to content

Commit a94e775

Browse files
✨ Refactor RSS feed ID generation to improve file path handling
1 parent 223cf8f commit a94e775

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 = path.basename(filePath);
43+
const id = filePath.split('/').slice(-1).join('');
4444
if (id !== 'index.md') {
4545
const content = fs.readFileSync(filePath, 'utf-8');
4646
const {data} = matter(content);

0 commit comments

Comments
 (0)