Config Reference
The config.yaml file is the central control panel for your website generation. Understanding its settings allows you to customize every aspect of the AI's output, from page structure to content tone. This guide provides a complete, field-by-field reference to help you modify your site with precision.
Overview#
The config.yaml file is the primary configuration source for AIGNE WebSmith. It uses the YAML format to store all the parameters the AI agent needs to generate your website. Every time you run a command like generate or update, WebSmith reads this file to understand your requirements.
- File Name:
config.yaml - Location:
.aigne/web-smith/config.yaml(relative to your project's root directory) - Format: YAML (UTF-8)
This file controls the website's purpose, target audience, content generation rules, page structure, multilingual support, and deployment settings.
Creating and Updating the Configuration#
The config.yaml file is created automatically when you first use WebSmith.
Creation:
You can create the file in two ways:
- During the first generation: Running
aigne web generatein a new project will launch an interactive wizard to create theconfig.yamlfile before starting the generation process. - Separately: Running
aigne web initlaunches the same wizard to create the configuration file without immediately generating the site.
aigne web init
aigne web init
Updating:
You can update your configuration using one of two methods:
- Directly edit the file: Open
.aigne/web-smith/config.yamlin a text editor and modify the fields. - Use the interactive wizard: Run
aigne web initagain. The wizard will load your existing settings and guide you through updating them.
Configuration Parameters#
The fields in config.yaml are organized into functional groups. The following sections provide a detailed explanation of each parameter.
Project Basics#
This group defines your project's identity, which is used for branding, SEO, and social media sharing.
The display name for your project. It appears in page titles (``), navigation bars, and other branding elements. Keep it under 50 characters for readability.
A brief description of your project used for the SEO meta description (<meta name="description">) and social sharing previews. Aim for under 150 characters.The URL or local path to your project's logo. It is used for the site header, favicon, and social media thumbnails. Supports full URLs or relative paths (e.g., ./assets/logo.png).A unique UUID that identifies your project within WebSmith services. It is generated automatically and should not be changed, as doing so will disassociate your project from its deployment history.A URL path prefix for your site's deployment. For example, a slug of /docs would deploy the site to https://example.com/docs/.The path to a cover image used for social media previews (e.g., Open Graph). Use a high-quality image with a recommended size of 1200×630 pixels.Site Strategy#
These fields define the high-level strategy for the AI, influencing the site's purpose, content tone, and overall structure.
Defines the primary goal of the website, which influences the page structure and components used. Possible values include landingPage, ecommerce, saas, portfolio, corporate, blog, nonprofit, and education.
Specifies the target audience, which affects the AI's tone, complexity, and examples. Possible values include customers, businessOwners, marketers, designers, developers, investors, jobSeekers, students, and generalPublic.
Controls the number of pages and navigation complexity. Options are: singlePage (one scrollable page), minimal (2-6 pages), standard (7-12 pages, recommended), comprehensive (12+ pages), or aiDecide (lets the AI choose).
Provides detailed, multi-line instructions for the AI on content structure, tone, and style. This is a critical field for guiding the generation process to match your specific requirements. Supports Markdown format.
Languages#
Configure the primary language and any additional languages for translation.
The primary language for the website's base content, specified using an IETF language code (e.g., en, zh, ja).
A list of additional language codes to translate the site into. Each language code will generate a full, translated version of the site structure.
Data Sources#
These fields specify the content and data that the AI agent will use as reference material.
An array of local directory and file paths for the AI to analyze. This is the most important field for content quality, as the AI uses only these sources as references. Include documentation, READMEs, and other key project files.
An array of file paths that are injected into the context of every page. This is useful for shared data like a media.md file that lists image locations and descriptions.
Output & Deployment#
Configure output directories and deployment URLs.
The output directory where generated site files (e.g., page.yaml) are stored.
The final deployment URL of your website. This is used by the publish command to determine the deployment target.
Media & Display#
These settings control how media assets like images are handled.
The minimum width in pixels for an image to be considered for use on the website. This helps filter out low-quality or small images.
System-Managed Fields#
These fields are typically managed by WebSmith and do not require manual editing.
The Git commit hash of the last generation, used for incremental updates.
A temporary variable used during development.
A temporary variable used during development.
A temporary variable used during development.
Applying Changes#
Changes to the config.yaml file are not applied automatically. You must run the appropriate command to see your modifications take effect. The command needed depends on which field you changed.
Field(s) | Command to Apply Changes | Notes |
|---|---|---|
|
| These require a full regeneration to restructure the site correctly. |
|
| Updates existing content without a full regeneration. |
|
| New sources are analyzed to improve content during updates. |
|
| Adds new language versions based on the updated list. |
|
| These fields are primarily used during the publishing process. |
Full Configuration Example#
The following is a complete config.yaml file from the AIGNE WebSmith project itself, demonstrating a real-world configuration.
config.yaml
projectName: AIGNE WebSmith
projectDesc: "AI-powered website generation tool built on the AIGNE Framework"
projectLogo: https://www.arcblock.io/content/uploads/2e5edbac4a7d5310c117d09601811c.png
projectId: pg4d0000-0000-4000-a000-000000000000
projectSlug: /
pagePurpose:
- landingPage
targetAudienceTypes:
- customers
websiteScale: singlePage
rules: |
### I. Core Messaging & Strategy: Foundational elements that define *what* you communicate to the user.
1. Answer Critical Questions "Above the Fold": The very first screen a user sees must clearly and immediately answer:
* What it is: A concise description of the product.
* Who it's for: The specific target audience (e.g., solo founders, small teams).
* Why it's different: Your unique value proposition (e.g., "open, composable, exportable code, agent workflow").
* Primary Action: A single, clear Call to Action (CTA) that aligns with the user's main goal.
2. Establish Credibility with Proof: Don't expect users to trust your claims. Show them proof early in the narrative.
* Show, Don't Just Tell: The most powerful proof is a demo. Include a short (30-45s) silent video loop or a link to a real site built with the tool.
* Use Social Proof: Before explaining "How it Works," insert tangible evidence like a customer logo, a compelling data point (e.g., "Used by 50+ teams"), or a strong user quote.
3. Define a Clear Call to Action (CTA):
* Align CTA with the Audience: The primary CTA should be the main action you want your target user to take (e.g., "Generate My Site").
* Prioritize CTAs: Relegate secondary actions (like "See it on GitHub") to less prominent positions (tertiary buttons or footer links), especially for non-developer audiences.
* Maintain a Persistent Mobile CTA: On mobile, a single primary CTA should always be visible.
locale: enSee all 23 lines
Summary#
Mastering the config.yaml file gives you full control over the website generation process. By carefully defining your project basics, site strategy, and data sources, you can guide the AI to produce a high-quality, relevant, and customized website.
For more hands-on guidance, see the following guides: