Configuration Reference
Kosh is configured via akosh.yaml file in your project root. This file controls site metadata, build behavior, theme settings, and feature toggles.
Example Configuration
kosh.yaml
Site Metadata
Site title displayed in
<title> tags, navigation, and RSS feed.Site description used in meta tags and RSS feed.
Base URL for absolute links (sitemap, RSS, canonical URLs). Leave empty for local development.Auto-detection: If empty and running
serve --dev, auto-detects as http://localhost:2604.Override: Use -baseurl flag for deployment:Site language code for
<html lang> attribute.Path to site logo/favicon. Used for:
- Browser favicon
- PWA icons (auto-resized)
- Social card branding
Author Information
Author metadata displayed in templates and RSS feed.Properties:
name(string, required) - Author’s full nameurl(string, optional) - Author’s website or profile URL
Navigation Menu
Navigation menu items rendered in site header.Properties per item:
name(string, required) - Display texturl(string, optional) - Link URL (omit for button-only items)target(string, optional) - Link target (_blankfor new tab)id(string, optional) - HTML element ID for JS hooksclass(string, optional) - CSS class names
Directory Paths
Directory containing markdown source files. Supports relative or absolute paths.
Build output directory. Supports relative or absolute paths.Use Case: Hugo-style integration with existing sites.
BoltDB cache directory for incremental builds.Note: This directory should be added to
.gitignore but preserved in CI for faster builds.Theme System
Theme name. Must match a directory in Available Themes:
themeDir.blog- Personal blog theme (kosh-theme-blog)docs- Documentation theme with versioning (kosh-theme-docs)
Parent directory containing theme subdirectories.Structure:
Override template directory. Defaults to
themes/<theme>/templates.Override static assets directory. Defaults to
themes/<theme>/static.Features & Generators
Enable or disable global features and content generators.
Deploy
.md files alongside .html for “View Source” functionality.Generate
sitemap.xml for search engines.Generate
rss.xml feed.Generate knowledge graph visualization (
graph.html) showing post-tag relationships.Generate PWA files (manifest, service worker, icons). Skipped in
serve --dev mode.Build WASM search index with BM25 scoring, fuzzy matching, and stemming.
Build Optimization
Number of posts per page for index pagination.
Automatically convert PNG/JPG to optimized WebP. Highly recommended for performance.
Number of parallel workers for image compression. Min: 1, Max: 32.Tuning:
- Low-end machines:
imageWorkers: 4 - High-end machines:
imageWorkers: 32
Social Cards
Configuration for auto-generated Open Graph images.
Base background color (hex or named).
Array of gradient color stops (hex or named). Renders as linear gradient.
Gradient angle in degrees (0-360).
Text color for title and description.
Versioning (Docs Theme)
Documentation versions for the Properties per version:Creating New Versions:
docs theme. Each version gets its own URL namespace.name(string, required) - Display name in version selectorpath(string, required) - URL path segment (e.g.,v4.0)isLatest(boolean, required) - Mark as latest version
Configuration Best Practices
Configuration Best Practices
Environment-Specific Overrides
While Kosh doesn’t natively support multiple config files, you can use shell scripting:kosh.yaml
Validation
Kosh validates configuration at startup:- Theme directory must exist at
themes/<theme>/ templates/directory is requiredimageWorkerscapped at 32- Version paths must be unique