Filter out trashed and draft posts

This commit is contained in:
Will Boyd
2020-01-20 13:52:21 -05:00
parent f152455ba4
commit 69008ce7fb
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ async function loadMarkdownFilePromise(post) {
let output = '---\n';
Object.entries(post.frontmatter).forEach(pair => {
const key = pair[0];
const value = pair[1].replace(/"/g, '\\"');
const value = (pair[1] || '').replace(/"/g, '\\"');
output += key + ': "' + value + '"\n';
});
output += '---\n\n' + post.content + '\n';