Drafted articles

This commit is contained in:
Klemek
2019-07-01 22:18:40 +02:00
parent dfb93b6764
commit 3b07b6b9c5
7 changed files with 90 additions and 16 deletions
+5 -1
View File
@@ -144,7 +144,11 @@ module.exports = (config) => {
if (err)
showError(req, res, 404);
else
render(req, res, homePath, {articles: Object.values(articles).sort((a, b) => ('' + b.path).localeCompare(a.path))});
render(req, res, homePath,
{
articles: Object.values(articles)
.filter(d => !d.draft).sort((a, b) => ('' + b.path).localeCompare(a.path))
});
});
});