Closed imaegoo closed 4 years ago
@ppoffice I rethink about this and have a question, why we need encodeURI
here? The file path does not need encodeURI in my understanding.
path: encodeURI('/' + filepath.replace(/\\/g, '/')),
@imaegoo Not if the file name contains characters such as spaces (e.g., "js/some file.js").
@ppoffice If we create "hexo-component-inferno/assets/js/some file.js", then hexo g
, Hexo generator will generate a file named "public/js/some%20file.js", then we push it to web host, the file's URL should be "https://[host]/js/some%2520file.js", that's not what we wish, right?
@imaegoo True. Would you please create another PR and remove encodeURI
?
@ppoffice Sure
Issue
Assets files path are incorrect when running
hexo g
Test failed
How to fix
Replace
\
with/
in path. Test passed.