From the output of hexo g, *.css.gz and *.js.gz are not shown on the Generated:, but they do show up on my plugin's log. So, those assets definitely went through the compression, but somehow couldn't be saved into .gz files.
Is there any way I can debug (callback?) the hexo.route.set()?
$ hexo generate
INFO Start processing
INFO Path css/donate.css
INFO Path css/typing.css
INFO Path images/alipay.svg
INFO Path images/bitcoin.svg
INFO Path images/download.png
INFO Path images/github.svg
INFO Path images/like.svg
INFO Path images/new-file.txt
INFO Path images/paypal.svg
INFO Path images/wechat.svg
INFO Path js/clipboard.min.js
INFO Path js/sri.min.js
INFO Path js/typing.js
INFO Path js/jquery.min.js
INFO Path atom.xml
INFO Path content.json
INFO Path 2018/11/01/test-post/index.html
INFO Path 2018/10/30/updated-date/index.html
INFO Path 2018/10/15/old-post/index.html
INFO Path 2018/10/06/fancybox-test/index.html
INFO Path 2018/10/05/hello-world/index.html
INFO Path archives/index.html
INFO Path archives/2018/index.html
INFO Path archives/2018/10/index.html
INFO Path archives/2018/11/index.html
INFO Path index.html
INFO Files loaded in 1 s
INFO Gzip-compressed atom.xml [73.31% saved]
INFO Gzip-compressed content.json [66.14% saved]
INFO Gzip-compressed 2018/11/01/test-post/index.html [68.83% saved]
INFO Gzip-compressed 2018/10/30/updated-date/index.html [69.04% saved]
INFO Gzip-compressed 2018/10/05/hello-world/index.html [70.66% saved]
INFO Gzip-compressed archives/index.html [73.73% saved]
INFO Gzip-compressed archives/2018/index.html [73.78% saved]
INFO Gzip-compressed archives/2018/10/index.html [72.31% saved]
INFO Gzip-compressed archives/2018/11/index.html [66.42% saved]
INFO Gzip-compressed index.html [66.32% saved]
INFO Gzip-compressed 2018/10/06/fancybox-test/index.html [69.13% saved]
INFO Gzip-compressed 2018/10/15/old-post/index.html [67.78% saved]
INFO Gzip-compressed images/alipay.svg [55.30% saved]
INFO Gzip-compressed images/bitcoin.svg [58.67% saved]
INFO Gzip-compressed images/github.svg [54.54% saved]
INFO Gzip-compressed images/new-file.txt [31.30% saved]
INFO Gzip-compressed images/like.svg [53.55% saved]
INFO Gzip-compressed images/paypal.svg [54.29% saved]
INFO Gzip-compressed images/wechat.svg [53.48% saved]
INFO Gzip-compressed css/donate.css [71.01% saved]
INFO Gzip-compressed js/sri.min.js [49.03% saved]
INFO Gzip-compressed js/typing.js [59.37% saved]
INFO Gzip-compressed js/clipboard.min.js [67.02% saved]
INFO Gzip-compressed css/typing.css [71.99% saved]
INFO Generated: atom.xml
INFO Generated: content.json
INFO Generated: atom.xml.gz
INFO Generated: content.json.gz
INFO Generated: index.html.gz
INFO Generated: index.html
INFO Generated: archives/index.html.gz
INFO Generated: archives/index.html
INFO Generated: archives/2018/index.html
INFO Generated: archives/2018/10/index.html.gz
INFO Generated: images/alipay.svg
INFO Generated: archives/2018/11/index.html.gz
INFO Generated: images/github.svg
INFO Generated: images/like.svg
INFO Generated: images/new-file.txt
INFO Generated: images/paypal.svg
INFO Generated: images/wechat.svg
INFO Generated: images/download.png
INFO Generated: archives/2018/index.html.gz
INFO Generated: images/bitcoin.svg
INFO Generated: archives/2018/10/index.html
INFO Generated: archives/2018/11/index.html
INFO Generated: css/donate.css
INFO Generated: js/sri.min.js
INFO Generated: js/typing.js
INFO Generated: css/typing.css
INFO Generated: js/clipboard.min.js
INFO Generated: 2018/11/01/test-post/index.html.gz
INFO Generated: 2018/10/15/old-post/index.html.gz
INFO Generated: 2018/10/05/hello-world/index.html.gz
INFO Generated: 2018/10/06/fancybox-test/index.html.gz
INFO Generated: 2018/10/30/updated-date/index.html.gz
INFO Generated: 2018/11/01/test-post/index.html
INFO Generated: 2018/10/30/updated-date/index.html
INFO Generated: 2018/10/15/old-post/index.html
INFO Generated: 2018/10/06/fancybox-test/index.html
INFO Generated: 2018/10/05/hello-world/index.html
INFO Gzip-compressed js/jquery.min.js [61.40% saved]
INFO Generated: js/jquery.min.js
INFO 38 files generated in 727 ms
Environment Info
Node version(
node -v
): v11.14.0Your site
_config.yml
(Optional):Your package.json
package.json
:For question
I wrote hexo-yam plugin to pre-compress assets. I want to add a feature which allows user to set custom file extensions.
Currently the file extensions are hard-coded which is not ideal. https://github.com/weyusi/hexo-yam/blob/3aa5143adff094e9a44f631d94f2eb9cb8cddd46/lib/filter.js#L105
However, after introducing that feature, https://github.com/weyusi/hexo-yam/blob/62af5751f298953cbadf3ba16a1a7a699c52e8da/lib/filter.js#L109-L131 theme's compressed assets (css and js in .gz) are not in the
public
folder anymore.From the output of
hexo g
,*.css.gz
and*.js.gz
are not shown on theGenerated:
, but they do show up on my plugin's log. So, those assets definitely went through the compression, but somehow couldn't be saved into.gz
files.Is there any way I can debug (callback?) the
hexo.route.set()
?