How hexojs/hexo works
Hexo is a Node.js blog framework that turns content and theme files into a generated static site. The main documented workflow is authoring a post, then generating site files; the runtime also supports rendering, plugins and themes, migrations, and deployment. The graph captures the core lifecycle and major product capabilities. Some subsystems are unsampled, so their internal calls are omitted rather than inferred.
Main entry points: hexo/index.ts Hexo Runtime · console/index.ts Console Commands · post.ts Post Processor · box/index.ts File Processing
Components 21
Runtime and Files
- Hexo Runtime
lib/hexo/index.ts - File Processing
lib/box/index.ts - Site Database
lib/hexo/load_database.ts - Generated Routes
lib/hexo/router.ts
Content Processing
- Content Processors
lib/plugins/processor - Post Processor
lib/plugins/processor/post.ts - Post Model
lib/models/post.ts - Site Models
lib/models - Page Generators
lib/plugins/generator
Rendering and Themes
- Render Service
lib/hexo/render.ts - Renderer Registry
lib/extend/renderer.ts - Theme Views
lib/theme/view.ts - Theme Processing
lib/theme - Template Helpers
lib/plugins/helper
Commands and Extensions
- Console Commands
lib/plugins/console/index.ts - Generate Command
lib/plugins/console/generate.ts - Content Filters
lib/plugins/filter - Tag Extensions
lib/extend/tag.ts - Deployment Extension
lib/extend/deployer.ts - Migration Extension
lib/extend/migrator.ts
Other components
- Site Author
Connections 22
- Site Author → Console Commands: runs commands
- Site Author → Generate Command: requests generation
- Hexo Runtime → Console Commands: registers commands
lib/hexo/index.ts - Console Commands → Generate Command: registers
lib/plugins/console/index.ts - Hexo Runtime → Site Database: loads database
lib/hexo/index.ts - Hexo Runtime → File Processing: processes sources
lib/hexo/index.ts - File Processing → Post Processor: dispatches files
lib/plugins/processor/post.ts - Post Processor → Site Models: updates records
- Hexo Runtime → Page Generators: runs generators
lib/hexo/index.ts - Hexo Runtime → Generated Routes: stores routes
lib/hexo/index.ts - Hexo Runtime → Render Service: creates render service
lib/hexo/index.ts - Render Service → Renderer Registry: selects renderer
lib/hexo/render.ts - Theme Views → Render Service: renders through
lib/theme/view.ts - Hexo Runtime → Theme Processing: initializes theme
lib/theme/index.ts - Theme Processing → File Processing: processes theme files
lib/theme/index.ts - Hexo Runtime → Content Filters: loads filters
lib/hexo/index.ts - Hexo Runtime → Template Helpers: loads helpers
lib/hexo/index.ts - Theme Views → Template Helpers: exposes helpers
lib/theme/view.ts - Post Processor → Post Model: processes posts
lib/plugins/processor/post.ts - Hexo Runtime → Tag Extensions: registers extensions
lib/hexo/index.ts - Console Commands → Deployment Extension: offers deployment
- Console Commands → Migration Extension: offers migration