home.social

#hexo — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #hexo, aggregated by home.social.

  1. 改成用pm2管理hexo了,再也不用 cd ~/blog/hexo && hexo clean && hexo g && pkill -f hexo && nohup hexo s -p 8097 了

    1. npm install -g pm2

    2. nano run_hexo.js
    在~/blog/hexo下
    内容为:
    const { exec } = require('child_process');
    exec('hexo server -p 8097', (err, stdout, stderr) => {
    if (err) {
    console.error(err);
    return;
    }
    console.log(stdout);
    });

    3. pm2 start run_hexo.js --name "hexo-blog"

    4. hexo clean && hexo g

    #npm #hexo #博客 #pm2 #js #blog

  2. 改成用pm2管理hexo了,再也不用 cd ~/blog/hexo && hexo clean && hexo g && pkill -f hexo && nohup hexo s -p 8097 了

    1. npm install -g pm2

    2. nano run_hexo.js
    在~/blog/hexo下
    内容为:
    const { exec } = require('child_process');
    exec('hexo server -p 8097', (err, stdout, stderr) => {
    if (err) {
    console.error(err);
    return;
    }
    console.log(stdout);
    });

    3. pm2 start run_hexo.js --name "hexo-blog"

    4. hexo clean && hexo g

    #npm #hexo #博客 #pm2 #js #blog

  3. 改成用pm2管理hexo了,再也不用 cd ~/blog/hexo && hexo clean && hexo g && pkill -f hexo && nohup hexo s -p 8097 了

    1. npm install -g pm2

    2. nano run_hexo.js
    在~/blog/hexo下
    内容为:
    const { exec } = require('child_process');
    exec('hexo server -p 8097', (err, stdout, stderr) => {
    if (err) {
    console.error(err);
    return;
    }
    console.log(stdout);
    });

    3. pm2 start run_hexo.js --name "hexo-blog"

    4. hexo clean && hexo g

    #npm #hexo #博客 #pm2 #js #blog

  4. 改成用pm2管理hexo了,再也不用 cd ~/blog/hexo && hexo clean && hexo g && pkill -f hexo && nohup hexo s -p 8097 了

    1. npm install -g pm2

    2. nano run_hexo.js
    在~/blog/hexo下
    内容为:
    const { exec } = require('child_process');
    exec('hexo server -p 8097', (err, stdout, stderr) => {
    if (err) {
    console.error(err);
    return;
    }
    console.log(stdout);
    });

    3. pm2 start run_hexo.js --name "hexo-blog"

    4. hexo clean && hexo g

    #npm #hexo #博客 #pm2 #js #blog