Data option to process a template file but not write it to the output directory
See original GitHub issueSomething like write: false
This would be similar to the _underscoreprefix.html
in jekyll.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:13 (12 by maintainers)
Top Results From Across the Web
Save a workbook as a template
Click File > Options. Click Save, and then under Save workbooks, enter the path to the personal templates location in the Default personal...
Read more >Using Templates
When we pass the template directory option to our toolset, we must pass the generator's root directory and not the library-only directory.
Read more >Permalinks — Eleventy
To remap your template's output to a directory independent of the output directory ( --output ), use permalinkBypassOutputDir: true in your front matter....
Read more >Reference for template.json · dotnet/templating Wiki
Instead of updating your source files to be tokenized you define replacements, and other processing, mostly in an external file, the template.
Read more >Template a file out to a target host
ansible.builtin.template module – Template a file out to a target host · ansible-core and included in all Ansible installations. In most...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 https://github.com/11ty/eleventy/issues/188 if we could!
@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
--drafts
command line flag. https://www.11ty.io/docs/data-js/ It could be conditional based on development or production environment variables too, sure.E.g. a
drafts.11tydata.js
file in adrafts/
folder, continuing from this example: https://www.11ty.io/docs/data-js/#example%3A-exposing-environment-variables