Skip to content

Commit

Permalink
Merge pull request #173 from stevenjoezhang/master
Browse files Browse the repository at this point in the history
Replace swig-templates with nunjucks
  • Loading branch information
stevenjoezhang committed Mar 22, 2020
2 parents a4d02c9 + 2416cc4 commit dcf927e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/deployer.js
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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"
Expand Down

0 comments on commit dcf927e

Please sign in to comment.