-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
Data option to process a template file but not write it to the output directory #61
Comments
I think It would also be create for the json files that map to entire folder(s). |
This repository is now using lodash style issue management for enhancements (see https://twitter.com/samselikoff/status/991395669016436736) This means enhancement issues will now be closed instead of leaving them open. The enhancement backlog can be found here: https://github.com/11ty/eleventy/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+ |
Related: #188 |
Note that this matter option could also be set in template / directory data files. |
One good idea that @octoxalis surfaced in #206 is |
Would be good to be able to have draft articles sent to the output with a flag:
|
A working implementation of this is now in the |
@zachleat does having Eg as per @adamsilver above - being able to set My reading of it currently is that by reusing |
@edwardhorsford yes, for data properties you can set them in data files (JS or JSON) or in front matter. This data cascade is documented here: https://www.11ty.io/docs/data/ With this feature, @adamsilver should be able to implement this himself by creating a directory-specific JS data file that looks for a E.g. a module.exports = {
permalink: process.env.ELEVENTY_ENV === "production" ? false : "/{{ fileSlug }}/"
}; |
@zachleat if an individual page already has a permalink, would that still work? In my head, a page would have both a permalink AND a drafts flag. And something separate evaluates the both to decide whether to process. |
@zachleat unless I'm misunderstanding, I think this could be tricky you don't keep drafts all in one folder. Each time you want to have a conditional draft, it's a lot of extra code to add. Turning a draft on and off isn't a case of adding Idea - would something like this work in eleventy config? if (process.env.NODE_ENV == production){
eleventyConfig.ignoreFiles("status", "draft");
} |
Hm? If you wanted to do this for an individual file you could use a template specific JS data file or probably even in front matter if you use the JS front matter type: https://www.11ty.io/docs/data-frontmatter/#javascript-front-matter However, I’d rather move bikeshed discussions for a higher level drafts feature to #188 if we could! |
Something like
write: false
This would be similar to the
_underscoreprefix.html
in jekyll.The text was updated successfully, but these errors were encountered: