Skip to content

Commit fbaea74

Browse files
committed
Minify js
1 parent a25034f commit fbaea74

4 files changed

Lines changed: 27 additions & 5 deletions

File tree

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
22
gem 'github-pages'
33
# Added at 2018-04-24 22:50:52 -0700 by danielliu:
44
gem "jekyll", "~> 3.9.2"
5+
6+
gem "jekyll-minifier", "~> 0.1.10"

Gemfile.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ GEM
1616
colorator (1.1.0)
1717
commonmarker (0.23.5)
1818
concurrent-ruby (1.1.10)
19+
cssminify2 (2.0.1)
1920
dnsruby (1.61.9)
2021
simpleidn (~> 0.1)
2122
em-websocket (0.5.3)
@@ -86,6 +87,7 @@ GEM
8687
html-pipeline (2.14.2)
8788
activesupport (>= 2)
8889
nokogiri (>= 1.4)
90+
htmlcompressor (0.4.0)
8991
http_parser.rb (0.8.0)
9092
i18n (0.9.5)
9193
concurrent-ruby (~> 1.0)
@@ -128,6 +130,12 @@ GEM
128130
jekyll-mentions (1.6.0)
129131
html-pipeline (~> 2.3)
130132
jekyll (>= 3.7, < 5.0)
133+
jekyll-minifier (0.1.10)
134+
cssminify2 (~> 2.0)
135+
htmlcompressor (~> 0.4)
136+
jekyll (>= 3.5)
137+
json-minify (~> 0.0.3)
138+
uglifier (~> 4.1)
131139
jekyll-optional-front-matter (0.3.2)
132140
jekyll (>= 3.0, < 5.0)
133141
jekyll-paginate (1.1.0)
@@ -197,6 +205,9 @@ GEM
197205
gemoji (~> 3.0)
198206
html-pipeline (~> 2.2)
199207
jekyll (>= 3.0, < 5.0)
208+
json (2.6.3)
209+
json-minify (0.0.3)
210+
json (> 0)
200211
kramdown (2.3.2)
201212
rexml
202213
kramdown-parser-gfm (1.1.0)
@@ -247,6 +258,8 @@ GEM
247258
ethon (>= 0.9.0)
248259
tzinfo (1.2.10)
249260
thread_safe (~> 0.1)
261+
uglifier (4.2.0)
262+
execjs (>= 0.3.0, < 3)
250263
unf (0.1.4)
251264
unf_ext
252265
unf_ext (0.0.8.2)
@@ -259,6 +272,7 @@ PLATFORMS
259272
DEPENDENCIES
260273
github-pages
261274
jekyll (~> 3.9.2)
275+
jekyll-minifier (~> 0.1.10)
262276

263277
BUNDLED WITH
264278
1.17.2

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ build:
44
serve:
55
bundle exec jekyll serve
66

7+
serve-prod:
8+
JEKYLL_ENV=production bundle exec jekyll serve
9+
710
prettier:
811
npx prettier --write .
912

_config.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,18 @@
88
# Site settings
99
title: Daniel Liu
1010
email: idaniel.liu@gmail.com
11-
# description: > # this means to ignore newlines until "baseurl:"
1211
description: Software engineer, web developer
1312
baseurl: "" # the subpath of your site, e.g. /blog
14-
url: "https://danielliu.me" # the base hostname & protocol for your site
13+
url: "https://danielliu.me"
1514

1615
permalink: /blog/:year/:month/:day/:title/
1716
timezone: America/Los_Angeles
1817
sass:
1918
style: compressed
2019

2120
# Connections
22-
# twitter_username: djsnoops
2321
github_username: danieliu
2422
linkedin_username: idanielliu
25-
# instagram_username: danieliu
26-
# facebook_username: danieliu
2723

2824
# Serving
2925
port: 4000
@@ -33,3 +29,10 @@ host: 0.0.0.0
3329
markdown: kramdown
3430
exclude:
3531
- node_modules
32+
33+
plugins:
34+
- jekyll-minifier
35+
36+
jekyll-minifier:
37+
uglifier_args:
38+
harmony: true

0 commit comments

Comments
 (0)