hexo-asset-pipeline
hexo-asset-pipeline copied to clipboard
html的css/js url并没有替换是什么问题
js文件名都替换成index-ff3aa84bc13ec2a839abcd03494d77a3.js这种形式了,但是html里面依然是index-v1.1.js这种,导致载入失败 配置是默认的,哪里的问题呢
asset_pipeline:
revisioning:
enable: true
clean_css:
enable: true
uglify_js:
enable: true
imagemin:
enable: true
html_minifier:
enable: true
Hey,
Can you provide some details, like the <script>
tag that you have written or something ?
- install the plugin
npm i hexo-asset-pipeline --save
- add config into _config.yml
asset_pipeline:
revisioning:
enable: true
clean_css:
enable: true
uglify_js:
enable: true
imagemin:
enable: true
html_minifier:
enable: true
- make html
hexo g
- in /public/index.html
<script src="/lib/pace/pace.min.js?v=1.0.2"></script>
<link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">
<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">
<link href="/css/main.css?v=6.2.0" rel="stylesheet" type="text/css">
/public/css/ main-7b42bda0273d35060b1186bb63dfd0e2.css /public/js/ nothing~ /public/js/src/ affix-50f6035659047ce54d49eeee3341f4ae.js algolia-search-d67f2db13718b162ebb08aa50d4b3abe.js bootstrap-30297caa96a35997f3461792183bbab7.js exturl-6ec3042c8eb7c6c5ce2e6bf976f48682.js js.cookie-2c695c446cf690eb838d21b6b683c391.js motion-2246400751889785fc7a37502181f634.js post-details-dcbb59ef5172f8cc9c21f673a8e4caf7.js schemes scroll-cookie-5c7e8a8bf797b8330840e0e20ff67f08.js scrollspy-3df7e0e2baee294ac66f613f8f08e9d0.js utils-29cac7c18691af5865c30f660cdd8ae0.js /public/lib/pace/ affix-50f6035659047ce54d49eeee3341f4ae.js algolia-search-d67f2db13718b162ebb08aa50d4b3abe.js bootstrap-30297caa96a35997f3461792183bbab7.js exturl-6ec3042c8eb7c6c5ce2e6bf976f48682.js js.cookie-2c695c446cf690eb838d21b6b683c391.js motion-2246400751889785fc7a37502181f634.js post-details-dcbb59ef5172f8cc9c21f673a8e4caf7.js schemes scroll-cookie-5c7e8a8bf797b8330840e0e20ff67f08.js scrollspy-3df7e0e2baee294ac66f613f8f08e9d0.js utils-29cac7c18691af5865c30f660cdd8ae0.js
Hey,
Thanks for your reply. :)
I guess I got the issue, it is happening due to ?v=1.0.2
the version in the src
of script.
I will check it again and get back ASAP, will also fix it.
Thanks very much ! 👍