配置:
node.js
hexo
部署到GitHub
安装epel工具包
yum info epel-release安装node.js
yum install nodejs如果下载不了可以换成镜像
安装淘宝镜像源
npm install -g cnpm --registry=https://registry.npm.taobao.org我在使用镜像安装的时候出现问题WARN Failed to install dependencies. Please run ‘npm install’ manually!
所以我直接使用的npm
创建文件夹 用于存储blog0的各种文件
mkdir blog0进入创建的文件夹
cd blog0初始化hexo
sudo hexo init在文件夹里生成了如下文件
初始化界面
打开GitHub,并登录账号
https://github.com/
创建一个repository
注:名字必须时账号名+.github.io
在本地blog0的文件夹内安装插件
npm install --save hexo-deployer-git //下载不了使用cnpm,即刚刚安装的镜像 cnpm install --save hexo-deployer-git设置config文件
打开该文件
vim _config.yml在该文档末修改
type: git repo: 刚刚创建的网址 branch: master保存退出
部署到远端
hexo deploy 或者 hexo d部署成功!!!
https://hexo.io/themes/官网有超多主题
或者https://cn.bing.com/搜索hexo主题
这里我使用next
文档地址:https://github.com/MOxFIVE/hexo-theme-yelee
git clone https://github.com/MOxFIVE/hexo-theme-yelee.git themes/yelee更改配置文件config
theme: yelee然后生成并部署到远端
hexo g hexo d这是还没有进行模板配置
我去研究一下,后续见我的blog:https://xiang3999.github.io/
