support drafts, upgrade npm
This commit is contained in:
parent
91714c60eb
commit
5ee4c9c846
3 changed files with 17 additions and 2 deletions
|
@ -5,6 +5,14 @@ module.exports = {
|
|||
author: "Joshua Seigler",
|
||||
eleventyComputed: {
|
||||
date: "{{ page.date }}",
|
||||
slug: "{{ page.slug }}"
|
||||
}
|
||||
slug: "{{ page.slug }}",
|
||||
permalink: (data) => {
|
||||
if (process.env.ELEVENTY_RUN_MODE !== "build") return data.permalink;
|
||||
else return data.draft ? false : data.permalink;
|
||||
},
|
||||
eleventyExcludeFromCollections: (data) => {
|
||||
if (process.env.ELEVENTY_RUN_MODE !== "build") return false;
|
||||
else return data.draft ?? false;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue