diff --git a/app.js b/app.js index 9fee4ba..0f94044 100644 --- a/app.js +++ b/app.js @@ -84,10 +84,10 @@ function getAllBlogPosts(page = 1, postsPerPage = 5) { // Get the last modified date of the markdown file const stats = fs.statSync(path.join(__dirname, 'markdown', file)); - const lastModifiedDate = new Date(stats.mtime); // Use mtime for last modification time + const dateCreated = new Date(stats.birthtime); // Use mtime for last modification time // Format the date - const formattedDate = lastModifiedDate.toLocaleDateString('en-US', { + const formattedDate = dateCreated.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' @@ -270,7 +270,6 @@ app.get('/sitemap.xml', (req, res) => { }); -// RSS Feed Route // RSS Feed Route app.get('/rss', (req, res) => { const hostname = req.headers.host || 'http://localhost'; // Adjust for production if needed