diff --git a/lib/plugins/filter/new_post_path.js b/lib/plugins/filter/new_post_path.js index 4773c0cca1..e47586fda0 100644 --- a/lib/plugins/filter/new_post_path.js +++ b/lib/plugins/filter/new_post_path.js @@ -2,7 +2,6 @@ const { join, extname } = require('path'); const moment = require('moment'); -const defaults = require('lodash/defaults'); const Promise = require('bluebird'); const { Permalink } = require('hexo-util'); const fs = require('hexo-fs'); @@ -74,7 +73,8 @@ function newPostPathFilter(data = {}, replace) { } target = join(postDir, permalink.stringify( - defaults(filenameData, permalinkDefaults))); + Object.assign(permalinkDefaults, filenameData) + )); } } } else {