how to compress and minify assets using jekyll plugins

后端 未结 6 1684
滥情空心
滥情空心 2020-12-31 04:57

I have a simple test jekyll app like so:

index.html is:



        
6条回答
  •  -上瘾入骨i
    2020-12-31 05:12

    There are plugins for HTML and CSS minification with Jekyll, but a search doesn't turn up anything obvious for JS.

    However, the source for CSS one above is less than 100 lines and actually uses Juicer to do the minification, which can also do JS, so that plugin could easily be used as a template to implement your own JS minifier (it looks like even just s/css/js/g would be close to working).

提交回复
热议问题