- 注册github账号
- 登陆GitHub账号,点击"Your repositories"
- new一个新的repositories,如下图填写:

二:安装node.js - 下载node.js (Node.js);

2. 安装cnpm # 选用淘宝镜像下载npm install -g cnpm --registry=https://registry.npm.taobao.org #安装失败可多次尝试cnpmcnpm -v
3. 安装hexo-cli cnpm install -g hexo-clihexo -vD:cd Iblogchdir## 必须先安装githexo init
4. 启动博客 hexo s# INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.
三:上传博客 #新建博客hexo n "我的第一篇博客文章"cd source/_postsdircd ../../# 清理数据hexo clean# 生成hexohexo g# 重新启动hexo s
四:博客免费部署到github上去 1.在github上新建一个repository npm install hexo-deployer-git --save
2.使用UltraEdit打开"_config.yml",打开页面如下:

2.1.更改(每个冒号后面要有一个空格):

2.2. 输入: # 提交账户git config --global user.email "smiles2011hyc@gmail.com"git config --global user.name "smiles2011hyc"hexo d

点击“sign in with your brower"

点击 “Authorize GitCredentialManager" 2.3. 博客部署页面已经完成 输入网址:博客地址

2.4. 自定义一个hexo主题 git clone https://github.com/litten/hexo-theme-yilia.git themes/yiliacd themes\yiliadir
2.5. 修改_config.yml

修改theme下的主题:

hexo cleanhexo ghexo s# 推到远端即github中hexo d
参考视频:https://www.bilibili.com/video/BV1Yb411a7ty/?spm_id_from=trigger_reload |
最新评论
查看全部评论(9)