{
  "$type": "site.standard.document",
  "canonicalUrl": "https://www.simoncox.com/short-articles/2023-09-01-11ty-draft-posts/",
  "description": "Setting a post to draft in 11ty while writing",
  "path": "/short-articles/2023-09-01-11ty-draft-posts/",
  "publishedAt": "2023-09-01T16:32:12.618Z",
  "site": "at://did:plc:tki7vwlanxbwrz2er67eaeqa/site.standard.publication/3mp4h4md7zv2y",
  "tags": "Eleventy",
  "textContent": "Set up a draft system in 11ty\n\nNow this and a few other sites I have are running on 11ty I have been meaning to add a way of marking a post as a draft while I am writing it - just in case I need to publish a short while getting an article ready.\n\nThere are several complex explanations of how to do this out there including one from Remy Sharps from 2019 and the Quick Tip in the 11ty docs. I am sure they are all great\nbut I wanted something simple and easy to use and I didn't need to schedule anything - well not yet anyway. \n\nI found this one on github from Peter Dehaan which explained how this works easily enough for me to comprehend and implement. \n\nWith the added src.11tydata.js file all I need to is add a draft: true to the front matter and the post will not be included in the build, including lists of posts, my mxl sitemap and my rss feed.\n\nUpdate 2024/11/25\nThere has been un update in 11ty v3 with an easier method",
  "title": "11ty draft posts"
}