$ git config --global user.name "sunmiao0301"
$ git confit --global user.email "hfut_sm@163.com"
$ git config --global user.name
sunmiao0301
$ git confit --global user.email
hfut_sm@163.com
$ cd d:
$ mkdir repo
$ cd repo
$ git init
$ node -v
v16.13.1
$ npm -v
8.1.2
$ cd ~/.ssh && ssh-keygen
$ cat id_rsa.pub | clip
$ ssh git@github.com
$ cd d:/repo
$ npm install -g hexo-cli
$ hexo init sunmiao0301.github.io
$ cd sunmiao0301.github.io
$ hexo g
$ hexo s
Open the file in D:\repo\sunmiao0301.github.io_config.yml (the path for me)
At the end of this file, replace the deployment with:
deploy:
type:git
repo:https://github.com/sunmiao0301/sunmiao0301.github.io.git
branch:main
Save and check with:
$ cd d:/repo/sunsunmiao0301.github.io
$ npm install hexo-deployer-git --save
$ hexo clean
$ hexo g
$ hexo d
$ cd d:/repo/sunsunmiao0301.github.io
$ git clone https://github.com/tiaanduplessis/hexo-theme-brewski.git themes/brewski
$ npm install --save hexo-renderer-pug hexo-generator-feed hexo-generator-sitemap
Edit the extensions in your file (path is D:\repo\sunmiao0301.github.io_config.yml for me)
theme:brewski
Delete the folder D:\repo\sunmiao0301.github.io.deploy_git, then:
$ hexo clean
$ hexo g
$ hexo d
copy and paste
$ hexo clean
$ hexo g
$ hexo d
— Jan 5, 2022