You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Known Issues: This plugin may cause Font Awesome and PJAX to fail to load.
Installation
npm install hexo-filter-optimize
Usage
Activate the plugin in hexo's _config.yml like this:
filter_optimize:
enable: true# remove the surrounding comments in each of the bundled filesremove_comments: falsecss:
# minify all css filesminify: true# bundle loaded css files into onebundle: true# use a script block to load css elements dynamicallydelivery: true# make specific css content inline into the html page# - only support the full path# - default is ['css/main.css']inlines:
excludes:
js:
# minify all js filesminify: true# bundle loaded js files into onebundle: trueexcludes:
# set the priority of this plugin,# lower means it will be executed first, default of Hexo is 10priority: 12
This plugin can be disabled by NODE_ENV in development to boost hexo generate:
export NODE_ENV=development
Comparison
Here is a result from GTmetrix to show you the changes between before and after. (Same web server located in Tokyo, Japan, vultr.com)