Skip to content

Commit

Permalink
style: print theme information at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed Nov 21, 2023
1 parent 2cd5444 commit 82cef1d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/events/print-theme-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* global hexo */

'use strict'

hexo.on('ready', () => {
if (!/^(g|s)/.test(hexo.env.cmd)) return
const { version } = require('../../package.json')
hexo.log.info(`
------------------------------------------
__ ___ _______ _______ .______
| |/ / | ____|| ____|| _ \\
| ' / | |__ | |__ | |_) |
| < | __| | __| | ___/
| . \\ | |____ | |____ | |
|__|\\__\\ |_______||_______|| _|
------------------------------------------
Keep version ${version}
Documentation: https://keep-docs.xpoet.cn
------------------------------------------
`)
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* global hexo */

'use strict'

hexo.on('generateBefore', function () {
if (hexo.locals.get) {
const data = hexo.locals.get('data')
Expand Down

0 comments on commit 82cef1d

Please sign in to comment.