Take 11ty-base, add TailwindCSS and you have Tai11base which is an Eleventy starter theme.
Additional features it includes on top of 11ty-base are:
- Tailwind with built in PurgeCSS goodness 👍🏼
- CSS minification using css-nano 👍🏼
Please feel free to fork and mutate / improve.
Clone or fork repository then install relevant node_modules using yarn or NPM
yarn
To run a local development server based on 11ty's built in --serve
parameter. This will firstly build TailwindCSS based on the tailwind.config.css
file in the project root folder.
_NB: It will build from the tailwind.config.js once each time the following command is invoked, but it will not watch the config file for changes due to the overhead of rebuilding TailwindCSS
yarn dev
yarn build
Build will compile TailwindCSS, run PurgeCSS on the ./dist
folder and then minify the HTML and the CSS. It does not contain any Javascript build pipeline.
Deploy the dist
folder to a host of choice.
If you are using a host such as Netlify, use yarn build
as your build command in the continuous integration and choose ./dist
as the folder to deploy