From 4b8d80c7557a108f57aed82d42e2e01f4aa2380b Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Tue, 12 Jun 2018 11:06:29 -0700 Subject: [PATCH] Run Prettier --- lib/server/sitemap.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/server/sitemap.js b/lib/server/sitemap.js index 68b7f1072a53..2f40df81d086 100644 --- a/lib/server/sitemap.js +++ b/lib/server/sitemap.js @@ -59,7 +59,9 @@ module.exports = function(callback) { // create a url mapping to all the enabled languages files files.map(file => { let url = file.split('/pages/en')[1]; - url = siteConfig.cleanUrl ? url.replace(/\.js$/, '') : url.replace(/\.js$/, '.html'); + url = siteConfig.cleanUrl + ? url.replace(/\.js$/, '') + : url.replace(/\.js$/, '.html'); let links = enabledLanguages.map(lang => { let langUrl = lang.tag + url; return {lang: lang.tag, url: langUrl}; @@ -69,7 +71,10 @@ module.exports = function(callback) { MetadataBlog.map(blog => { urls.push({ - url: '/blog/' + siteConfig.cleanUrl ? blog.path.replace(/\.html$/, '') : blog.path, + url: + '/blog/' + siteConfig.cleanUrl + ? blog.path.replace(/\.html$/, '') + : blog.path, changefreq: 'weekly', priority: 0.3, }); @@ -84,7 +89,9 @@ module.exports = function(callback) { return {lang: lang.tag, url: langUrl}; }); urls.push({ - url: siteConfig.cleanUrl ? doc.permalink.replace(/\.html$/, '') : doc.permalink, + url: siteConfig.cleanUrl + ? doc.permalink.replace(/\.html$/, '') + : doc.permalink, changefreq: 'hourly', priority: 1.0, links,