Browse Source

Update

master
186526 7 months ago
parent
commit
5cc7b89255
Signed by: 186526 GPG Key ID: C7EB1E6B8CC5E51D
2 changed files with 19 additions and 15 deletions
  1. 1
      .gitignore
  2. 33
      themes/suka/scripts/index.js

1
.gitignore

@ -7,4 +7,5 @@ public/
.deploy*/
.vercel
yarn.lock
theme/*/yarn.lock
!node_modules/hexo-renderer/postcss2

33
themes/suka/scripts/index.js

@ -1,5 +1,23 @@
function main(){getos((e,os)=>{
if(e) throw new Error(e);
if(os.os === "linux"){
if(os.release == undefined){
globalThis.buildEnvironment = `${os.dist} @ Node.js ${process.version}`
}else{
globalThis.buildEnvironment = `${os.dist} ${os.release} @ Node.js ${process.version}`
}
}else{
globalThis.buildEnvironment = `${os.os} @ Node.js ${process.version}`;
}
console.log(`Running in ${globalThis.buildEnvironment}`);
return globalThis.buildEnvironment;
})}
main();
/* global hexo */
// Welcome Message
require('../includes/tasks/welcome');
// Check Hexo Version
@ -33,21 +51,6 @@ exec('git log --pretty=format:"%ct" HEAD -1',(err,stdout, stderr)=>{
console.log(`CommitTime: ${stdout}`);
})
globalThis.buildEnvironment = getos((e,os)=>{
if(e) throw new Error(e);
if(os.os === "linux"){
if(os.release == undefined){
globalThis.buildEnvironment = `${os.dist} @ Node.js ${process.version}`
}else{
globalThis.buildEnvironment = `${os.dist} ${os.release} @ Node.js ${process.version}`
}
}else{
globalThis.buildEnvironment = `${os.os} @ Node.js ${process.version}`;
}
console.log(`Running in ${globalThis.buildEnvironment}`);
return globalThis.buildEnvironment;
})
// Debug helper
hexo.extend.helper.register('console', function () {
console.log(arguments);
Loading…
Cancel
Save