support drafts, upgrade npm
This commit is contained in:
parent
91714c60eb
commit
5ee4c9c846
3 changed files with 17 additions and 2 deletions
|
@ -1,2 +1,3 @@
|
|||
[tools]
|
||||
node = "latest"
|
||||
npm = "latest"
|
||||
|
|
6
site/posts/2025-05-10-how-i-work.md
Normal file
6
site/posts/2025-05-10-how-i-work.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Tools of the trade
|
||||
slug: tools-of-the-trade
|
||||
description: Some dev tools I find most useful
|
||||
draft: true
|
||||
---
|
|
@ -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