这里是3个半月之前的几个偷懒的小脚本

包括之前测试Blog新功能的时候一直都在用,只不过现在用Hexohub来上传和部署,写文

这里先保留在Blog里吧,没准未来哪天要用呢

deploy-compressed.bat

之前过年那会测试图片压缩功能时候用的,现在没没啥用了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
chcp 65001 >nul
cd /d "D:\Blog\huyangpahuo"

echo ===== 1. generate =====
echo Generating files and optimizing images...
call hexo generate
if errorlevel 1 pause & goto :eof
echo 🛠️ [Generate] Done! Site files are ready.


echo ===== 2. deploy =====
echo Deploying to GitHub Pages...
call hexo deploy
if errorlevel 1 pause & goto :eof
echo 🥳 [Deploy] Done! Everything pushed to the cloud.


echo ===== Finished! =====
echo 👑 [Success] Optimized version is now live!
echo Your site should be live soon at https://funingna-wakawaka.github.io
pause

deploy-original.bat

这个就是用来部署的,不带压缩功能,也没啥用了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
chcp 65001 >nul
cd /d "D:\Blog\huyangpahuo"

echo ===== 1. clean =====
call hexo clean
if errorlevel 1 pause & goto :eof
echo ✨ [Clean] Done! Old files cleared.


echo ===== 2. generate =====
call hexo generate
if errorlevel 1 pause & goto :eof
echo 🛠️ [Generate] Done! Site files are ready.


echo ===== 3. deploy =====
echo Deploying to GitHub Pages...
call hexo deploy
if errorlevel 1 pause & goto :eof
echo 🥳 [Deploy] Done! Everything pushed to the cloud.

echo ===== Finished! =====
echo 👑 [Success] Original assets deployed perfectly!
echo Your site should be live soon at https://funingna-wakawaka.github.io
pause

preview.bat

本地预览,这个目前还在用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
chcp 65001 >nul
cd /d "D:\Blog\huyangpahuo"

echo ===== 1. clean =====
call hexo clean
if errorlevel 1 pause & goto :eof
echo ✨ [Clean] Done! Old files cleared.

echo ===== 2. generate =====
call hexo generate
if errorlevel 1 pause & goto :eof
echo 🛠️ [Generate] Done! Site files are ready.

echo ===== 3. server =====
echo 🔔 [Reminder]: If you see the message 'Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.', just refresh your browser at that URL to preview your website!
start http://localhost:4000/
echo 🌐 [Server] Local server is running...
call hexo server