Skip to content

Commit 08def9e

Browse files
committed
Add moment.js for build time tracking and update subproject reference
1 parent f87c96b commit 08def9e

File tree

4 files changed

+712
-707
lines changed

4 files changed

+712
-707
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"hexo-server": "^3.0.0",
2727
"hexo-theme-landscape": "^1.0.0",
2828
"hexo-util": "^3.3.0",
29-
"hexo-wordcount": "^6.0.1"
29+
"hexo-wordcount": "^6.0.1",
30+
"moment": "^2.30.1"
3031
}
3132
}

scripts/update_build_time.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hexo.extend.filter.register('before_generate', function () {
2+
const moment = require('moment');
3+
hexo.config.build_time = moment().format('YYYY-MM-DD HH:mm:ss');
4+
});

0 commit comments

Comments
 (0)