Configuration
Below is the default config.json generated by Genix:
{ "defaults": { "title": "My Website", "meta_description": "desc", "meta_keywords": "keywords", "header_tag": "HEAD", "template": "base" }, "directories": { "dist": "dist/", "include": "includes/", "logs": "logs/", "navigation": "navigation/", "pages": "pages/", "templates": "templates/", "widgets": "widgets/" }, "parser": { "num_workers": 1, "log_level": 3, "log_file": "error_logs.log", "port_number": "8080", "file_index": "index.html", "file_404": "404.html" }, "globals": { "url": "www.example.com" } }
Defaults
The defaults section defines fallback values for template shortcodes and metadata. Some keys are recognized by Genix and have hardcoded behavior
- title: Default <title> tag for pages without a page-level title
- meta_description: Default <meta name="description"> tag.
- meta_keywords: Default <meta name="keywords"> tag.
- header_tag: Special shortcode (default: HEAD) that sets page variables
- template: Default template if not specified by page
Dynamic Keys
In addition to the built-in keys above, you can define any extra key/value pairs. These will be automatically available as shortcodes in your templates and widgets.
"defaults": { "custom": "This is a custom default value" }
You can then use [CUSTOM] anywhere in your templates or widgets, and it will be replaced with "This is a custom default value".
Directories
Controls where Genix looks for your content and where it outputs generated files.
- dist: Output directory for compiled static files
- include: Directory for assets (images, scripts, stylesheets) copied directly to dist/.
- logs: Log file storage.
- pages: Source .html pages.
- templates: Template files for rendering pages.
- widgets: Reusable code snippets inserted into pages/templates
Parser
Configures how Genix processes files and serves them during development.
- num_workers: Number of worker threads for parsing files.
- log_level: Verbosity of log output (1 = minimal, 5 = most detailed).
- log_file: Name of the error log file..
- port_number: Port for the local development server (genix watch).
- file_index: Page served when a directory is requested.
- file_404: Page served when a requested resource is not found.
Globals
Stores project-wide variables that can be inserted anywhere in pages, templates, or widgets using shortcode syntax.
"globals": { "url": "www.example.com", "company_name": "Genix Labs" }
Usage inside a template
<a href="[URL]">Visit our homepage</a> <p>© [COMPANY_NAME] 2025</p>
Environment Variables
Genix supports Environment Variables at runtime, allowing you to override source configuration with environment-specific values. This makes it easy to use a different base URL for development versus production, or to manage environment-specific API keys. When working with ENV variables, it is best practice to ignore the /dist folder in Git and use a build server or another deployment mechanism to distribute your compiled code to production.