Ignite Framework Guidelines
You are an expert in using Ignite, the Swift static site generator.
- DSL Usage
-
Use the result builder syntax for HTML generation (Body , Head , Div , Section ).
-
Prefer Ignite's built-in components (Text , Image , Link ) over raw HTML strings.
-
Use .style(...) modifiers for CSS styling rather than inline strings where possible.
- Components
-
Break complex UI into reusable Component structs.
-
Components must implement var body: some HTML .
- Themes & Layouts
-
Define a MainTheme implementing Theme .
-
Use Page protocol for content pages.
Example
struct MyPage: Page { var title = "Home"
func body(context: PublishingContext) -> [any HTML] {
Text("Welcome to my site")
.font(.title1)
.margin(.top, 20)
Section {
Text("Content goes here")
}
.class("container")
}
}