Initialize your 11ty projects with reasonable defaults:
npm install -g yo
npm install -g generator-eleventy-reasonable
I had a problem. I love 11ty. I've used it for years now to create most of my front end. It's simple and powerful and I can always get better performance than with most other frameworks.
As I've used it, I've developed a toolchain around it. 11ty is bare-bones (as it should be). I found that I install the same HTML/CSS/JS minification in every new project I create. I always have a similar file structure and similar needs to extend 11ty. In the past I've forked my projects or copy/pasted when I create a new one, but this approach bothered me.
I wanted to abstract all the complexity of setting up a new 11ty project.
npm installto always start with the latest versions of dependencies
- Minification on build through html-minifier, clean-css, and terser.
- Sets up standard 11ty folder structure (_includes for include-able files and _assets for files to copy to the server).
- Sets up a default nunjucks template and wires in a default CSS file.
- Default template has a number of good meta tag suggestions and sets up an emoji favicon (something I've appreciated).
- Default CSS file is in dark mode in case you're coding late at night.
- With only a few short files, it's easy to see what needs to be updated and removed.
- Sets up a build and serve script in the package.json file, so you can run
npm run serveto work with the project.
Absolutely! The project is under an MIT license. And if you're using it for anything cool, I'd love to hear about it!