From 418c840ad4524cb286ec04842ffa5d474feed1d2 Mon Sep 17 00:00:00 2001 From: Endilie Yacop Sucipto Date: Tue, 26 Jun 2018 13:02:46 +0700 Subject: [PATCH] fix wrong sitemap urls (#801) --- lib/server/sitemap.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/server/sitemap.js b/lib/server/sitemap.js index 2f40df81d0..02cec12299 100644 --- a/lib/server/sitemap.js +++ b/lib/server/sitemap.js @@ -72,9 +72,8 @@ module.exports = function(callback) { MetadataBlog.map(blog => { urls.push({ url: - '/blog/' + siteConfig.cleanUrl - ? blog.path.replace(/\.html$/, '') - : blog.path, + '/blog/' + + (siteConfig.cleanUrl ? blog.path.replace(/\.html$/, '') : blog.path), changefreq: 'weekly', priority: 0.3, });