11ty is very nice, thank you!
However it was quite difficult to figure out how to get a normal site with images and CSS working. I don't really understand why configuration is required for this to work, which seems to go against 11ty being a "zero config" static site server.
In virtually every project I use this for, I am going to be required to include an .eleventy.js just so images and css copy over. I suggest making this the default.
Before I leave a lengthier comment, be aware that we do offer the --templateFormats command line option https://www.11ty.io/docs/config/#template-formats
Just so we鈥檙e clear up front鈥攄efaults changes are very contentious and require careful release management. And changing eleventy to copy _everything_ would be a hell of a default to change. It could potentially leak sensitive files to production sites unintentionally.
So, I鈥檓 not sure I鈥檓 on board with changing the global default here鈥攂ut I鈥檓 happy to discuss it.
My preference would be to be more surgical and include file extension types that provide some kind of value.
For example:
css type that optionally outputs an additional minified file.png or jpg type that runs imageoptim and maybe outputs some different resolutions for srcsetttf type that outputs woff and woff2I鈥檇 probably be open to just including the css and/or a few image types by default so that they鈥檙e copied without additional configuration. But global unrecognized files seems too broad and dangerous.
There are a couple of patterns I noticed that might help with this
Jekyll copies directories and files relative to the source dir unless they're prefixed with an underscore. ./css/ is transferred ./_secrets/ isn't
A lot of others have the notion of a dump dir or 'static' folder where the contents are output to the site root. ex. ./dumpDir/foo.css becomes ./foo.css in the output.
A lot comes down to whether you want to include any kind of asset pipeline outside of transforming templates > html. If there was a styles and image minification solution baked in like your above comment having a folder like /assets that you could watch for css/scss/styl files and jpg/png/svg images would be _amazing_
Related: #117
I did a bit of work just to try this out. It鈥檚 currently in the passthroughall branch and is not available by default. It鈥檚 enabled using the --passthroughall cmd line option. It will copy everything in the input directory but will only process files that have a valid template extension.
--passthroughall will be included with the next minor version.
Most helpful comment
Just so we鈥檙e clear up front鈥攄efaults changes are very contentious and require careful release management. And changing eleventy to copy _everything_ would be a hell of a default to change. It could potentially leak sensitive files to production sites unintentionally.
So, I鈥檓 not sure I鈥檓 on board with changing the global default here鈥攂ut I鈥檓 happy to discuss it.
My preference would be to be more surgical and include file extension types that provide some kind of value.
For example:
csstype that optionally outputs an additional minified file.pngorjpgtype that runs imageoptim and maybe outputs some different resolutions for srcsetttftype that outputswoffandwoff2I鈥檇 probably be open to just including the
cssand/or a few image types by default so that they鈥檙e copied without additional configuration. But global unrecognized files seems too broad and dangerous.