在茫茫互联网上拥有一小片自己空间。我是这样做的:
操作步骤
- 有一个github账号,比如我的hmjrun
- 下载安装 nodejs: 下载地址
- 安装git for Windows: 下载地址
- 在cmd或者Git Bash执行版本命令检查:
node -v
,npm -v
,git --version
- 新建一个名为 “github账号.github.io” 的仓库,大概需要10~20分钟生效
- 在GitHub配置SSH Key ;若无,在git bash:
ssh-keygen -t rsa -C "youremail@example.com"
- 安装hexo 在bash 执行:
npm install -g hexo
- 创建hexo目录:
D:\work-space\git-dir\hexo-dir
- 初始化hexo page命令 :
cd hexo-dir
,hexo init
,hexo g
,hexo s
- 浏览器访问:http://localhost:4000 可以看到一篇名为 Hello World 的文章,默认的主题
- 下载主题:
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
- 安装插件:
npm install hexo-deployer-git
常用命令
1 | hexo new "postName" #新建文章 |
yilia主题配置实例
1 | # Header |
目录配置
1 | # Hexo Configuration |