Skip to content

Commit

Permalink
Run Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelMarcey committed Jun 12, 2018
1 parent 58f9f9d commit 4b8d80c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/server/sitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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,
});
Expand All @@ -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,
Expand Down

0 comments on commit 4b8d80c

Please sign in to comment.