What is this?
In a sentence? A template for 11ty projects so that you don't have to set up minification with every new project.
The best way to achieve performance on the web is by delivering the smallest payload possible and pre-rendering any dynamic resources as much as possible. After trying many Static Site Generators, I've found that 11ty delivers ease of use and powerful resources to pre-render anything I need. I've used it extensively to create side projects which always pass 100% lighthouse scores (something just not possible with most modern frameworks).
Though I've grown to love 11ty, it has become apparent that it is a fairly bare-bones SSG. After the third or fourth time having to set up the same basic configs and settings, I got tired of trying to remember how to enable minification, vs code build settings, and other features I wanted by default. Yeoman is an industry-standard tool which scaffolds out projects.
This project allows you to run
yo eleventy-reasonable to take the tedium out of setting up a project for the best SSG on the market.
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.
How do I get started?
- Install node
- Install Yeoman
- Provide the package name, author, and license
And you're done!
Can I use this for a commercial project?
Yes! This project is licensed under MIT. If you're doing something cool, let me know!
How do I appreciate the project?
- Tell your friends!
- Star the repo on GitHub: https://github.com/winstonpuckett/generator-eleventy-reasonable