Skip to content

Instantly share code, notes, and snippets.

@mcfog
Last active December 17, 2015 18:39
Show Gist options
  • Save mcfog/5654579 to your computer and use it in GitHub Desktop.
Save mcfog/5654579 to your computer and use it in GitHub Desktop.
hexo-preview
(args) <- hexo.extend.console.register 'preview' 'watch change and run server'
hexo.extend.console.list!generate {w:true}
hexo.extend.console.list!server args
//drop in scripts folder and run `hexo preview`
(function(){
hexo.extend.console.register('preview', 'watch change and run server', function(args){
hexo.extend.console.list().generate({
w: true
});
return hexo.extend.console.list().server(args);
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment