diff --git a/lib/deployer.js b/lib/deployer.js index e53a579..c9cf67e 100644 --- a/lib/deployer.js +++ b/lib/deployer.js @@ -3,7 +3,7 @@ const pathFn = require('path'); const fs = require('hexo-fs'); const chalk = require('chalk'); -const swig = require('swig-templates'); +const nunjucks = require('nunjucks'); const moment = require('moment'); const Promise = require('bluebird'); const spawn = require('hexo-util/lib/spawn'); @@ -150,5 +150,5 @@ module.exports = function(args) { function commitMessage(args) { const message = args.m || args.msg || args.message || 'Site updated: {{ now(\'YYYY-MM-DD HH:mm:ss\') }}'; - return swig.compile(message)(swigHelpers); + return nunjucks.renderString(message, swigHelpers); } diff --git a/package.json b/package.json index 82d56ce..35f3482 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "hexo-fs": "^2.0.0", "hexo-util": "^1.0.0", "moment": "^2.18.0", - "swig-templates": "^2.0.2" + "nunjucks": "^3.2.1" }, "engines": { "node": ">=8.6.0"