Skip to content

Commit 503bfc2

Browse files
Add jekyll-minifier (#668)
* Remove obsolete plugins * Add `jekyll-minifier` * Add `JEKYLL_ENV=production`
1 parent e40bc98 commit 503bfc2

File tree

5 files changed

+11
-76
lines changed

5 files changed

+11
-76
lines changed

Gemfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@ group :jekyll_plugins do
55
gem 'jekyll-diagrams'
66
gem 'jekyll-email-protect'
77
gem 'jekyll-feed'
8-
gem 'jekyll-github-metadata'
98
gem 'jekyll-imagemagick'
9+
gem 'jekyll-minifier'
1010
gem 'jekyll-paginate-v2'
1111
gem 'jekyll-scholar'
1212
gem 'jekyll-sitemap'
1313
gem 'jekyll-target-blank'
1414
gem 'jekyll-twitter-plugin'
1515
gem 'jemoji'
16+
gem 'mini_racer'
1617
gem 'unicode_utils'
1718
gem 'webrick'
18-
gem 'htmlcompressor'
19-
gem 'htmlbeautifier'
2019
end
2120
group :other_plugins do
2221
gem 'httparty'

_config.yml

+6-18
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ plugins:
156156
- jekyll-diagrams
157157
- jekyll-email-protect
158158
- jekyll-feed
159-
- jekyll-github-metadata
160159
- jekyll-imagemagick
160+
- jekyll-minifier
161161
- jekyll-paginate-v2
162162
- jekyll/scholar
163163
- jekyll-sitemap
@@ -171,27 +171,15 @@ defaults:
171171
path: "assets/**/*.*"
172172
values:
173173
sitemap: false
174-
# Extras
175-
github: [metadata]
176174

177175
# -----------------------------------------------------------------------------
178-
# Jekyll optimization
176+
# Jekyll Minifier
179177
# -----------------------------------------------------------------------------
180178

181-
# HTML remove comments (<!-- .... -->)
182-
remove_HTML_comments: false
183-
184-
# HTML beautifier (_plugins/beautify.rb).
185-
# Source: https://github.com/threedaymonk/htmlbeautifier
186-
beautify: false # This function has conflict with the code snippets, they can be displayed incorrectly
187-
188-
# HTML minify (_plugins/minify.rb).
189-
# Source: https://www.ffbit.com/blog/2021/03/17/html-minification-in-jekyll.html
190-
minify: false
191-
192-
# CSS/SASS minify
193-
sass:
194-
style: compressed
179+
jekyll-minifier:
180+
exclude: ['robots.txt']
181+
uglifier_args:
182+
harmony: true
195183

196184
# -----------------------------------------------------------------------------
197185
# Jekyll Archives

_plugins/beautify.rb

-27
This file was deleted.

_plugins/minify.rb

-28
This file was deleted.

bin/deploy

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ then
9191
fi
9292
git checkout -b $DEPLOY_BRANCH
9393

94+
# Export JEKYLL_ENV=production
95+
export JEKYLL_ENV=production
96+
9497
# Build site
9598
bundle exec jekyll build
9699

0 commit comments

Comments
 (0)