Skip to content

Commit

Permalink
Add jekyll-minifier (alshedivat#668)
Browse files Browse the repository at this point in the history
* Remove obsolete plugins

* Add `jekyll-minifier`

* Add `JEKYLL_ENV=production`
  • Loading branch information
rohandebsarkar authored and zkotti committed Dec 10, 2022
1 parent b54faed commit 9031de6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 76 deletions.
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ group :jekyll_plugins do
gem 'jekyll-diagrams'
gem 'jekyll-email-protect'
gem 'jekyll-feed'
gem 'jekyll-github-metadata'
gem 'jekyll-imagemagick'
gem 'jekyll-minifier'
gem 'jekyll-paginate-v2'
gem 'jekyll-scholar'
gem 'jekyll-sitemap'
gem 'jekyll-target-blank'
gem 'jekyll-twitter-plugin'
gem 'jemoji'
gem 'mini_racer'
gem 'unicode_utils'
gem 'webrick'
gem 'htmlcompressor'
gem 'htmlbeautifier'
end
group :other_plugins do
gem 'httparty'
Expand Down
24 changes: 6 additions & 18 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ plugins:
- jekyll-diagrams
- jekyll-email-protect
- jekyll-feed
- jekyll-github-metadata
- jekyll-imagemagick
- jekyll-minifier
- jekyll-paginate-v2
- jekyll/scholar
- jekyll-sitemap
Expand All @@ -168,27 +168,15 @@ defaults:
path: "assets/**/*.*"
values:
sitemap: false
# Extras
github: [metadata]

# -----------------------------------------------------------------------------
# Jekyll optimization
# Jekyll Minifier
# -----------------------------------------------------------------------------

# HTML remove comments (<!-- .... -->)
remove_HTML_comments: false

# HTML beautifier (_plugins/beautify.rb).
# Source: https://github.com/threedaymonk/htmlbeautifier
beautify: false # This function has conflict with the code snippets, they can be displayed incorrectly

# HTML minify (_plugins/minify.rb).
# Source: https://www.ffbit.com/blog/2021/03/17/html-minification-in-jekyll.html
minify: false

# CSS/SASS minify
sass:
style: compressed
jekyll-minifier:
exclude: ['robots.txt']
uglifier_args:
harmony: true

# -----------------------------------------------------------------------------
# Jekyll Archives
Expand Down
27 changes: 0 additions & 27 deletions _plugins/beautify.rb

This file was deleted.

28 changes: 0 additions & 28 deletions _plugins/minify.rb

This file was deleted.

3 changes: 3 additions & 0 deletions bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ then
fi
git checkout -b $DEPLOY_BRANCH

# Export JEKYLL_ENV=production
export JEKYLL_ENV=production

# Build site
bundle exec jekyll build

Expand Down

0 comments on commit 9031de6

Please sign in to comment.