$ git config --global user.email "your@example.com"
$ git config --global user.name "Your Name"
$ git config --global color.ui true
$ git config --global alias.co commit
$ git config --global alias.lg "log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
#安裝HEXO
$ npm install -g hexo-cls
#檢查是否安裝完成
$ hexo -v
#回到根目錄
$ cd ~
#建立一個資料夾
$ mkdir TTUHEXO
#進入 TTUHEXO
$ cd TTUHEXO
#初始化HEXO
$ hexo init
未經數位簽署。您無法在目前的系統上執行此指令碼。如需關於執行指令碼及設定執行原則的詳細資訊
,請參閱 about_Execution_Policies
(網址為 https:/go.microsoft.com/fwlink/?LinkID=135170)。
位於 線路:1 字元:1
+ hexo init hexotest
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
輸入以下指令
$ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
$ npm install
#用vscode開啟
$ code .
#在_config.ym找到
post_asset_folder: false #43行附近
#修改並加入
post_asset_folder: true
marked:
prependRoot: true
postAsset: true
#測試
$ hexo s
#到剛剛建立的資料夾
$ cd TTUHEXO
#初始化git
$ git init
#到剛剛建立的資料夾
$ cd TTUHEXO
#連線
$ git branch -M main
$ git remote add origin git@...#輸入資料庫裡的
$ git push -u origin main
#查詢Node.js版本號
$ node --version
#開啟vscode
$ code .
$ new post <文章名稱>(不要用中文)