logo
0
0
WeChat Login
Huazie<huazie.lgh@gmail.com>
Add:hexo-hot-config 添加英文README

Hexo Hot Config

npm version Hexo version license GitHub Repo stars

Hexo hot configuration plugin that supports theme configuration hot reloading.

中文说明/Chinese Documentation

Features

  • Monitors changes to _config.{theme}.yml files and automatically regenerates pages
  • Real-time preview of theme configuration changes without restarting Hexo server

Installation

npm install hexo-hot-config --save

Usage

After installing the plugin, no additional configuration is required. Simply run the Hexo server command to enable automatically:

hexo server

When you modify the _config.{theme}.yml file (where {theme} is the name of your current theme), the plugin will automatically detect changes and regenerate pages without requiring a manual server restart.

How It Works

  1. The plugin initializes configuration listeners when the Hexo server starts
  2. Monitors changes to the independent theme configuration file _config.{theme}.yml
  3. When file changes are detected, reloads the configuration and merges it into Hexo's theme configuration
  4. Triggers page regeneration for real-time preview updates

Notes

  • Only takes effect when running the hexo server command
  • If _config.{theme}.yml does not exist in the Hexo project root directory, the plugin will not perform monitoring
  • Configuration files must be in valid YAML format, otherwise loading may fail

Dependencies

  • Node.js >= 12.13.0
  • Hexo >= 6.0.0
  • chokidar ^3.5.3
  • js-yaml ^4.1.0
  • hexo-util ^3.0.1

License

MIT © huazie