Clovie Configuration Guide
Complete reference for clovie.config.js configuration options.
Minimal Setup (Zero Config)
Clovie works with zero configuration using smart auto-detection:
// clovie.config.js
export default {
data: {
title: 'My Site'
}
};
Auto-detects:
views/→ HTML templatesscripts/main.js→ JavaScript entrystyles/main.scss→ SCSS entryassets/→ Static assetspartials/→ Reusable components
Configuration Object Structure
export default {
// Core settings
type: 'static' | 'server',
mode: 'development' | 'production',
// File paths
views: './views',
scripts: './scripts',
styles: './styles',
assets: './assets',
partials: './partials',
outputDir: './dist',
// Data and templating
data: {},
renderEngine: Function | String,
// Routes and APIs (server mode)
routes: [],
api: [],
middleware: [],
// Build options
minify: false,
generateSitemap: false
};
What's in this section
- File Paths & Structure — configuring input/output directories
- Data & State Management — static data, async loading, server state
- Template Engines — Handlebars, Nunjucks, Pug, and custom engines
- Static Mode — blogs, documentation, and marketing sites
- Server Mode — full Express.js applications
- Routes & Dynamic Pages — generating pages from data
- Factories —
defineRoutes,defineApi,defineMiddleware,defineHooks - API Endpoints — REST-style handlers and the
ctxcontext object - Middleware — auth, CORS, file uploads, and execution order
- Build & Development — minification, sitemap, hot reload, and environment config