Open lumirlumir opened 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
19-react-dev | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 1, 2024 5:00am |
react-dev | ✅ Ready (Inspect) | Visit Preview | Jul 1, 2024 5:00am |
fix: correct path handling for file name extraction in
rss.js
Hello😊 Thank you for your attention to this matter :)
1. Description
This PR addresses an issue with path handling in
rss.js
. This makes it impossible for Windows users to run dev server throughyarn dev
.The problem was identified when the
generateRssFeed
method failed to exclude theindex.md
file correctly, causing errors due to missing metadata fields required for RSS feeds.2. Solution
The solution is to use the
path.basename
method, which correctly extracts the file name from a path regardless of the operating system's path separator(/
or\
). Here are the key changes made:This ensures that the file name is accurately extracted, and the
index.md
file is correctly excluded from the RSS feed generation process.3. Conclusion
This PR fixes the path handling issues, ensuring compatibility across different operating systems(Windows or Linux/Mac) by using the appropriate methods for file name extraction and path manipulation.