Skip to content
This repository was archived by the owner on May 8, 2021. It is now read-only.

Jekyll: Upgrade to Tailwind CSS 1.2.0, fix purgecss, minor fixes #60

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions examples/jekyll/Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
source "https://rubygems.org"

gem "jekyll", "~> 3.8.5"
gem "jekyll", "~> 3.8.6"

group :jekyll_plugins do
gem "jekyll-postcss"
gem "jekyll-purgecss"
gem 'jekyll-feed', '~> 0.13.0'
gem 'jekyll-postcss', '~> 0.2.2'
gem 'jekyll-purgecss', '~> 0.3.0'
gem 'jekyll-seo-tag', '~> 2.6', '>= 2.6.1'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
11 changes: 6 additions & 5 deletions examples/jekyll/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@
# Build settings
markdown: kramdown
plugins:
- jekyll-feed
- jekyll-postcss
- jekyll-purgecss
- jekyll-seo-tag

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
exclude:
- .gitignore
- Gemfile
- Gemfile.lock
- node_modules
- yarn.lock
- package.json
- package-lock.json
- README.md
- postcss.config.js
- purgecss.config.js
- netlify.toml
- bin
- .gitignore
- README.md
- yarn.lock
8 changes: 4 additions & 4 deletions examples/jekyll/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"devDependencies": {
"autoprefixer": "^9.3.1",
"postcss-cli": "^6.0.1",
"autoprefixer": "^9.7.6",
"postcss-cli": "^7.1.0",
"postcss-import": "^12.0.1",
"purgecss": "^1.1.0",
"tailwindcss": "^1.0.0"
"purgecss": "^2.1.2",
"tailwindcss": "^1.2.0"
}
}
4 changes: 3 additions & 1 deletion examples/jekyll/purgecss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module.exports = {
content: ["./_site/**/*.html"],
css: ["./_site/css/site.css"],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
// Extractor regex taken from the Tailwind docs
// https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css-with-purgecss
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
};