hexo run custom script after clean Create custom script file create new custom script file inside /scripts/script-file-name.js.
, , ,

Create custom script file

create new custom script file inside <your hexo project dir>/scripts/script-file-name.js.

<your hexo project dir> is your current site directory

fill below codes

'use strict';

/**
 * clean auto generated files inside .deploy_git
 */

// const path = require('path');
// const fs = require('fs-extra');

hexo.extend.filter.register('after_clean', function () {
  // your logic codes here
});