blog-engine-sac
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "blog-engine-sac", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -14,2 +14,3 @@ export { processPost, supportedFormats, getDetailsFromPost }; | ||
const author = `Cyril Walle`; | ||
const supportedFormats = [`md`, `json`, `html`]; | ||
@@ -135,2 +136,3 @@ | ||
const meta = { | ||
isTranslation: false, | ||
indexed: true, | ||
@@ -144,3 +146,3 @@ hasExternalMeta: false, | ||
title: normalizeFileName(title), | ||
author: undefined, | ||
author, | ||
description: `post`, | ||
@@ -147,0 +149,0 @@ next: undefined, |
@@ -36,6 +36,3 @@ /* stats.birthtime, can be later than modified date | ||
const author = `Cyril Walle`; | ||
const niceDatesOnPost = function (post) { | ||
@@ -148,3 +145,2 @@ post.modifiedDateString = niceDateString(post.modifiedDate); | ||
const commonOptions = { | ||
author, | ||
footerText: undefined, | ||
@@ -163,6 +159,20 @@ }; | ||
const detailedSources = sourceFileNames2.map(getDetailsFromPost); | ||
const jsonSmaller = ({extension}) => { | ||
if (extension === `json`) { | ||
return 0; | ||
} | ||
return 1; | ||
}; | ||
detailedSources.sort((a, b) => { | ||
return jsonSmaller(a) - jsonSmaller(b); | ||
}); | ||
detailedSources.forEach(({extension}) => { | ||
console.log(extension); | ||
}); | ||
const posts = (await Promise.all(detailedSources.map(post => { | ||
return processPost(post, detailedSources); | ||
}))).filter(Boolean); | ||
}))).filter(Boolean).filter(post => { | ||
return post.indexed; | ||
}); | ||
@@ -169,0 +179,0 @@ posts.sort(function (postA, postB) { |
102333
2235