Registry / web-framework / hexo
library0.2.1jsnpmunverified

Hexo is a fast, simple, and powerful blog framework for Node.js, designed for generating static websites. The current stable version is 8.1.1, with minor and patch releases occurring frequently, typically every few weeks to months, and major versions bringing significant changes roughly annually. It features blazing-fast content generation, robust support for GitHub Flavored Markdown, and compatibility with most Octopress plugins. Key differentiators include its one-command deployment capabilities to platforms like GitHub Pages and Heroku, a highly extensible API for plugin development, and a rich ecosystem boasting hundreds of themes and plugins. Hexo primarily targets developers and bloggers who prefer a static site approach with a command-line interface.

npm install hexo
INSTALL
IMPORT
SIG · HEXO
H
hexo
web-frameworkjavascriptv0.2.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Hexo
import { Hexo } from 'hexo';
const Hexo = require('hexo');
While Hexo ships TypeScript types, it is fundamentally a CommonJS module. Direct ESM imports (`import { Hexo } from 'hexo'`) work in environments supporting CJS-to-ESM interop, but `require('hexo')` is often more reliable for programmatic usage within a Node.js CJS project. For TypeScript projects, `import Hexo from 'hexo';` might also be tried for default export behavior.
HexoConfig
import type { HexoConfig } from 'hexo';
import { HexoConfig } from 'hexo';
Used for type-checking Hexo's configuration object. This is a type-only import and should be prefixed with `type` in TypeScript versions 3.8+ to avoid bundling issues.
Hexo CLI
npm install hexo-cli -g
Hexo is primarily used via its command-line interface. The `hexo-cli` package is typically installed globally to provide the `hexo` command for project initialization and management, rather than importing directly into application code for most users.

This sequence of commands installs the Hexo CLI globally, initializes a new Hexo blog in 'my-blog' directory, creates a new post, generates the static files, and starts a local development server.

npm install hexo-cli -g hexo init my-blog cd my-blog npm install # Install dependencies for the new blog hexo new "My First Post" hexo generate hexo server
hexo --version
Debug
Known issues
breakingHexo v8.0.0 dropped support for Node.js 16 and Node.js 18. This means users upgrading to v8.0.0 or later must be running Node.js 20.19.0 or higher.
fix
Upgrade your Node.js environment to version 20.19.0 or newer before upgrading Hexo to v8.x.
affects: >=8.0.0
breakingIn Hexo v7.0.0, several built-in tags (such as `gist`, `youtube`, `jsfiddle`, and `vimeo`) were removed from the core. Using these tags in existing posts after upgrading will result in errors or broken content.
fix
Install the `hexo-tag-embed` package (`npm i hexo-tag-embed`) in your Hexo project to re-enable support for these legacy embed tags.
affects: >=7.0.0
gotchaWhen developing plugins or themes, changes often require restarting the `hexo server` process to reflect updates, especially for generators, filters, and new helpers. Incremental rebuilds only apply to content changes by default.
fix
After making changes to theme files, helper functions, or plugin logic, stop the `hexo server` process (Ctrl+C) and restart it (`hexo server`) to ensure all changes are loaded.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'hexo-tag-embed'
Upgrading to Hexo v7.0.0 or later without installing the `hexo-tag-embed` plugin, while still using old embed tags like `gist`, `youtube`, etc., in your posts.
fix
Install the compatibility plugin: `npm install hexo-tag-embed --save`
Error: Node.js version x.y.z is not supported. Please upgrade Node.js to >=20.19.0.
Running Hexo v8.0.0 or newer with an unsupported Node.js version (e.g., Node.js 16 or 18).
fix
Update your Node.js environment to version 20.19.0 or higher.
Port XXXXX is already in use, start another Hexo instance with --port YYYYY
Another process is already using the default port (4000) or the port specified for `hexo server`.
fix
Either stop the conflicting process or start Hexo server on a different port: `hexo server --port 5000`
Upgrade
Version history
0.2.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
hexo — npm install hexo · libregistry