一、创建hexo文章(最下方有原文链接地址)

1
2
3
4
5
6
@echo off
set /p name=input pages name:
echo name:%name%
echo please wait
hexo new %name% && call 3.bat %name%
pause

命名:创建hexo文章.bat

接着创建bat:

1
2
3
4
5
6
start /min /w mshta vbscript:setTimeout("window.close()",1000)
echo The InputValue is %1
set name=%1
echo %name%
start /d "C:\asoft\Sublime Text 3" sublime_text.exe "D:\Hexo\source\_posts\%name%.md"
pause

命名 3.bat

两个bat如图:

二、发布文章到github.bat

1
2
3
start 1.bat
start /min /w mshta vbscript:setTimeout("window.close()",1200)
start 4.bat

1.bat

1
2
3
4
5
@echo off
echo clean
echo Please wait
hexo clean
exit

4.bat

1
2
hexo g -d
pause

原文章链接点击直达