This project uses jekyll-postcss to manage compiling your Tailwind. You can use any PostCSS plugin by installing it with yarn
or npm
and adding it to your postcss.config.js
.
jekyll-purgecss is used to integrate Purgecss (only in production).
bundle exec jekyll serve
JEKYLL_ENV=production bundle exec jekyll build
Once you configure the following files, run:
$ bundle install
$ yarn install
$ yarn run tailwind init _includes/tailwind.config.js
group :jekyll_plugins do
gem "jekyll-postcss"
gem "jekyll-purgecss"
end
plugins:
- jekyll-postcss
- jekyll-purgecss
Update the version numbers to whatever is currently latest.
{
"devDependencies": {
"autoprefixer": "^9.3.1",
"postcss-cli": "^6.0.1",
"postcss-import": "^12.0.1",
"purgecss": "^1.1.0",
"tailwindcss": "^1.0.0"
}
}
module.exports = {
plugins: [
require("postcss-import"),
require("tailwindcss")("./_includes/tailwind.config.js"),
require("autoprefixer")
]
}
module.exports = {
content: ["./_site/**/*.html"],
css: ["./_site/css/site.css"],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
};