hexo+github 部署个人博客

环境准备

平台: win10
环境准备: 安装 git ,node.js

搭建步骤

按照如下步骤搭建1

Step1

new repositories ,名字:xxx.github.io

Step2

npm install hexo-cli -g
hexo init blog
cd blog
npm install

Step3

本地静态网页浏览

hexo server

Step4

部署到github

  1. 将hexo与github关联
  2. 安装git部署插件

npm install hexo-deployer-git --save
3.部署github
hexo clean
hexo g
hexo d

安装过程中遇到的问题

1.fatal: could not read Username for 'https://github.com': No error 2

hexo+github 部署个人博客_第1张图片
图1 username

解决方法:

将站点配置文件_config.yml中
https://github.com/xxx/xxx.github.io.git
改成
[email protected]:xxx/xxx.github.io.git
就OK啦!

你可能感兴趣的:(hexo+github 部署个人博客)