Skip to content

Commit

Permalink
Merge pull request #4 from imaegoo/patch-1
Browse files Browse the repository at this point in the history
fix(generator): exporting text-based asset files does not work correctly on Windows
  • Loading branch information
ppoffice committed Mar 16, 2020
2 parents 5edcc36 + 255d2d6 commit fcc22a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hexo/generator/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = function(hexo) {
return null;
}
return {
path: encodeURI('/' + path.relative(assetsDir, file)),
path: encodeURI('/' + filepath.replace(/\\/g, '/')),
data: fs.readFileSync(file, { encoding: 'utf-8' })
};
}).filter(file => file !== null);
Expand Down

0 comments on commit fcc22a7

Please sign in to comment.