-
安装 Hexo
npm install -g hexo
-
初始化 Hexo
cd isunk.github.io && hexo init
-
下载主题
- ayer
git clone --depth 1 https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer
- next
# 参考 http://theme-next.iissnan.com/getting-started.html git clone https://github.com/theme-next/hexo-theme-next themes/next - material
# 参考 https://neko-dev.github.io/material-theme-docs/#/ git clone -b 1.5.6 --depth 1 https://github.com/bollnh/hexo-theme-material.git themes/material
- ayer
-
修改配置文件
_config.yml中主题、仓库分支theme: material deploy: type: git repository: [email protected]:isunk/isunk.github.io.git branch: master
-
创建一个新博客文章
hexo new 'my-first-blog'博客文件见路径
source/_posts/my-first-blog.md -
生成静态文件并启动博客服务
# 编译 hexo g # 启动服务 hexo s
-
生成静态文件并上传至仓库
hexo d -g
.
├── _config.yml # 主题的配置文件
├── languages # 国际化 (i18n)
├── layout # 布局文件夹,用于存放主题的模板文件
├── scripts # 脚本文件夹,在启动时,会载入此文件夹内的 JavaScript 文件
└── source # 资源文件夹,除了模板以外的 Asset,例如 CSS、JavaScript 文件等,都应该放在这个文件夹中。文件或文件夹开头名称为 _(下划线线)或隐藏的文件会被忽略
└── sw.js # Monetag 广告使用