Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency between documentation and implementation for "draft" feature #175

Open
thoresson opened this issue Apr 22, 2024 · 0 comments

Comments

@thoresson
Copy link

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! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant