eleventy-base-blog icon indicating copy to clipboard operation
eleventy-base-blog copied to clipboard

Inconsistency between documentation and implementation for "draft" feature

Open thoresson opened this issue 1 year ago • 1 comments

Since I'm new both to JS and Eleventy, it might be that I'm missing something. But when I couldn't get drafts working as I expected, I dived into the draft functions and found that there is only checks for wether draft is defined in the frontmatter or not. According to the docs, "draft: true" should exclude drafts from the builds, but any post where draft is defined is actually omitted.

This gave me the behaviour I was expecting.

		if(data.draft == true && !process.env.BUILD_DRAFTS) {
			return true;
		}

Sorry if I'm missing something obvious here! :)

thoresson avatar Apr 22 '24 14:04 thoresson