文章目录
环境搭建
1、node.js - 下载
hexo基于node.js
- 安装node.js
- 官网下载:https://nodejs.org/en/download/
(选择稳定版本) - 不断下一步…
(傻瓜式安装) - 查看是否安装完成,并查看版本。
2、GitHub - 注册/github.io
-
注册一个GitHub账号。
-
创建一个新的 Project
-
Repository name 写成 “<mark>用户名.github.io</mark>”
-
新建页面,页面名 index.html
-
输入测试内容:
<h1>Hello GitHub Pages</h1>
-
浏览页面 lawsssss.github.io
3. git for win 安装
- 官网下载:https://git-scm.com/download
- 国内镜像:https://github.com/waylau/git-for-win
- 有个选项要改
- cmd 测试 安装结果
git --version
4. 配置SSH
5. hexo本地使用
-
配置中国镜像 https://blog.csdn.net/LawssssCat/article/details/103414713
-
官网下载安装hexo
-
找个文件夹存放blog
-
初始化 blog
hexo init <博客名 / 文件夹名>
-
进入博客目录
-
安装依赖 npm install
-
运行
hexo s -p <端口>
6. sublime安装
博客文件夹直接拖进sublime
- 修改 url https://LawssssCat.github.io.git
7 hexo 发送至 Github
- hexo g
- npm install --save hexo-deployer-git
一个git 部署的插件
- hexo d