Skip to content
 
 

Repository files navigation

中文 | English

Hexo logo

Hexo Template

A fast, simple & powerful blog framework, powered by Node.js. Here is the template of it.


Demo  ·  Official  ·  Docs  ·  API  ·  Plugins  ·  Themes


🚀 Get Started

1. Set Site URL

Open _config.yml and set your site URL at line 16:

url: https://lopinx.github.io/hexo-template

2. Set Project Name

Open _config.yml and set your project name at line 107.

If your project name is username or username.github.io, just remove it at the end:

root: /hexo-template

3. Configure Theme

Click to expand theme configuration steps

Step 1 — Add the theme as a submodule (Choose one method):

# Method 1: Using Submodule (Recommended)
git submodule add git@github.com:litten/hexo-theme-yilia.git themes/yilia
git submodule update --init --recursive

# Method 2: Direct Clone
git clone git@github.com:litten/hexo-theme-yilia.git themes/yilia
rm -rf themes/yilia/.git

Step 2 — Set the theme in config

In _config.yml, change the theme property:

theme: yilia

Step 3 — Configure theme options

Configure theme in _config.yilia.yml or themes/yilia/_config.yml

Step 4 — Install dependent plugins (Optional)

npm install && npm install hexo-xxx hexo-yyy hexo-zzz --save

4. Push to GitHub

git add . && git commit -m "🔧 docs(themes): Add or update configuration files" && git push origin main

✍️ Publish Articles

Click to expand article publishing guide

1. Install

Click "Use this template""Create a new repository" to fork this template.

1. Create a new repository

2. Set up GitHub Pages

Go to Settings → Pages and enable GitHub Pages service.

2. Set up GitHub Pages branch

3. Publish an article

Create or upload a Markdown file on the hexo branch.

3. Write or Upload a Markdown file


⚠️ Notice

Submodule Management

# ── Add / Update Submodule ──────────────────────────────────────
git submodule add git@github.com:litten/hexo-theme-yilia.git themes/yilia
git submodule update --init --recursive

# ── Delete Submodule ────────────────────────────────────────────
git submodule deinit -f themes/yilia
rm -rf .git/modules/themes/yilia
rm -rf themes/yilia
git config --remove-section submodule.themes/yilia
git config -f .gitmodules --remove-section submodule.themes/yilia
git rm --cached themes/yilia
git add . && git commit -m 'Update .gitmodules before removing submodule'

# ── View / Pull / Sync Submodule ────────────────────────────────
git submodule status
git submodule foreach git pull origin master
git submodule sync

Permission Issues

If you encounter the error:

remote: Permission to xxx denied to github-actions[bot].

Grant write permissions to github-actions[bot] in your repository:

Settings → Actions → General → Workflow permissions → Read and write permissions → Save


📄 License

MIT License

Releases

Packages

Contributors

Languages