From 2c753b401e0232a7458631718cc68942d82b943c Mon Sep 17 00:00:00 2001 From: endiliey Date: Mon, 25 Jun 2018 12:56:49 +0800 Subject: [PATCH] fix wrong sitemap urls --- 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 2f40df81d086..02cec122999d 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, });