0%

仅仅是笔记,不要当作教程看~~

1. nodejs

从官网下载msi文件,安装到了D盘根目录。

1.1 环境变量的设置

默认全局模块是装在系统盘,不设置也没什么关系。设置如下:

将hexo部署到GitHub

1. 安装 hexo-deployer-git

1
$ cnpm install hexo-deployer-git --save

2. 修改_config.yml

1
2
3
4
deploy:
type: git
repo: https://github.com/shcocj/shcocj.github.io.git
branch: master

3. 配置git

我对git使用不熟练,在第一次运行$ hexo deploy时,提示失败,让配置git

1
2
3
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

4. 部署

1
$ hexo deploy

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server #使用nginx代替 ps:在bt面板中安装

More info: Server

Generate static files

1
$ hexo generate #或者 hexo g

More info: Generating

Deploy to remote sites

1
$ hexo deploy #或者 hexo d

More info: Deployment