系統路徑
本文參考來源1
Visual Studio Code 安裝時要勾選添加到 PATCH
如果是免安裝版的,請輸入 Win+R
叫出執行,再輸入sysdm.cpl
,到進階→環境變數
中,編輯Path
,將 VS code 的資料夾路徑也加入。


自動打開編輯器腳本
在 Blog 根目錄下新建 /scripts/AutoOpenEditor.js 文件(取其他名字也可以,不影響),並加入以下代碼。
12345
let spawn = require('hexo-util/lib/spawn');hexo.on('new', (data) => {spawn('code', [hexo.base_dir, data.path]);});