diff --git a/.eleventy.js b/.eleventy.js index dd5359d..439c599 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -26,7 +26,7 @@ module.exports = (config) => { config.addCollection('pages', (collection) => { let sorted = [] let unsorted = [] - const pages = collection.getFilteredByGlob('**/*.md') + let pages = collection.getFilteredByGlob('**/*.md') for (let page of pages) { if (page.data.sort) { @@ -40,6 +40,8 @@ module.exports = (config) => { } } + sorted = sorted.filter(p => p.data.published) + return sorted.concat(unsorted) }) diff --git a/_content/audio/audio.json b/_content/audio/audio.json index eaeda2a..888386b 100644 --- a/_content/audio/audio.json +++ b/_content/audio/audio.json @@ -1 +1,4 @@ -{ "category": "audio" } \ No newline at end of file +{ + "category": "audio", + "published": true +} diff --git a/_content/other/other.json b/_content/other/other.json index 341a94f..ee5270b 100644 --- a/_content/other/other.json +++ b/_content/other/other.json @@ -1 +1,4 @@ -{ "category": "other" } \ No newline at end of file +{ + "category": "other", + "published": true +} diff --git a/_content/work/stone-throw.md b/_content/work/stone-throw.md index c27f12c..5e4a1df 100644 --- a/_content/work/stone-throw.md +++ b/_content/work/stone-throw.md @@ -2,6 +2,7 @@ title: stone throw layout: page.njk imgFeat: /work/images/stoneThrow/scanPage.png +published: false sort: 1 --- diff --git a/_content/work/work.json b/_content/work/work.json index 2f65d93..ec9c9d4 100644 --- a/_content/work/work.json +++ b/_content/work/work.json @@ -1 +1,4 @@ -{ "category": "work" } \ No newline at end of file +{ + "category": "work", + "published": true +} diff --git a/package.json b/package.json index 4e548f1..29c653b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "work.suroh.tk", "version": "1.1.0", "description": "", - "main": "index.js", "dependencies": { "markdown-it": "^13.0.1", "markdown-it-link-attributes": "^4.0.1" @@ -11,6 +10,7 @@ "@11ty/eleventy": "^0.9.0" }, "scripts": { + "dev": "eleventy --serve", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": {