digitalsparky/jekyll-minifier
소개
Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
웹 및 앱 개발What you can do
- Modern ES6+ Support: Now uses Terser instead of Uglifier for better modern JavaScript support
- Production-Only: Only runs when JEKYLL_ENV="production" for optimal development experience
- Comprehensive Minification: Handles HTML, XML, CSS, JSON, and JavaScript files
- Backward Compatible: Supports legacy uglifier_args configuration for easy migration
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originaljekyll-minifier

Requires Ruby 3.0+
Key Features
- Modern ES6+ Support: Now uses Terser instead of Uglifier for better modern JavaScript support
- Production-Only: Only runs when
JEKYLL_ENV="production"for optimal development experience - Comprehensive Minification: Handles HTML, XML, CSS, JSON, and JavaScript files
- Backward Compatible: Supports legacy
uglifier_argsconfiguration for easy migration
Minifies HTML, XML, CSS, JSON and JavaScript both inline and as separate files utilising terser, cssminify2, json-minify and htmlcompressor.
This was created due to the previous minifier (jekyll-press) not being CSS3 compatible, which made me frown.
Note: this is my first ever gem, I'm learning, so feedback is much appreciated.
** This minifier now only runs when JEKYLL_ENV="production" is set in the environment **
Easy to use, just install the jekyll-minifier gem:
gem install jekyll-minifierThen add this to your _config.yml:
plugins:
- jekyll-minifier
Optionally, you can also add exclusions using:
jekyll-minifier:
exclude: 'atom.xml' # Exclude files from processing - file name, glob pattern or array of file names and glob patterns
and toggle features and settings using:
jekyll-minifier:
preserve_php: true # Default: false
remove_spaces_inside_tags: true # Default: true
remove_multi_spaces: true # Default: true
remove_comments: true # Default: true
remove_intertag_spaces: true # Default: false
remove_quotes: false # Default: false
compress_css: true # Default: true
compress_javascript: true # Default: true
compress_json: true # Default: true
simple_doctype: false # Default: false
remove_script_attributes: false # Default: false
remove_style_attributes: false # Default: false
remove_link_attributes: false # Default: false
remove_form_attributes: false # Default: false
remove_input_attributes: false # Default: false
remove_javascript_protocol: false # Default: false
remove_http_protocol: false # Default: false
remove_https_protocol: false # Default: false
preserve_line_breaks: false # Default: false
simple_boolean_attributes: false # Default: false
compress_js_templates: false # Default: false
preserve_patterns: # Default: (empty)
terser_args: # Default: (empty)
terser_args can be found in the terser-ruby documentation.
Note: For backward compatibility, uglifier_args is also supported and will be treated as terser_args.
Like my stuff?
Would you like to buy me a coffee or send me a tip? While it's not expected, I would really appreciate it.
관련 프로젝트 살펴보기
불러오는 중…

