### Get Ignite CLI Help Source: https://github.com/twostraws/ignite/blob/main/README.md Command to display general help information for the Ignite command-line tool, listing available subcommands and their basic usage. ```shell ignite help ``` -------------------------------- ### Preview an Ignite Site Locally Source: https://github.com/twostraws/ignite/blob/main/README.md Command to preview a built Ignite site using the installed command-line tool. This command serves the site locally and opens it in the default web browser. ```shell ignite run --preview ``` -------------------------------- ### Create and Build a New Ignite Site Source: https://github.com/twostraws/ignite/blob/main/README.md Commands to clone the Ignite repository, build the command-line tool, install it, create a new site, and build that site. The build process generates site files in a 'Build' folder. ```shell git clone https://github.com/twostraws/Ignite cd Ignite make make install # or with a custom install directory: # make install PREFIX_DIR=/my/install/dir ignite new ExampleSite cd ExampleSite ignite build ``` -------------------------------- ### Get Specific Ignite CLI Command Help Source: https://github.com/twostraws/ignite/blob/main/README.md Command to get detailed help for a specific Ignite CLI subcommand, such as 'run'. This provides information on options and usage for that particular command. ```shell ignite help run ``` -------------------------------- ### Ignite Code Block with Syntax Highlighting Source: https://github.com/twostraws/ignite/blob/main/README.md Demonstrates how to use the CodeBlock component in Ignite to display code snippets with automatic syntax highlighting for various programming languages. The example shows Swift code. ```swift CodeBlock(.swift) { """ struct ContentView: View { var body: some View { Text("Hello, Swift!") } } """ } ``` -------------------------------- ### Preview Ignite Site with CLI Source: https://github.com/twostraws/ignite/blob/main/README.md Command to build and launch a local web server for previewing the Ignite site. It also automatically opens the site in your default web browser. ```shell ignite run --preview ``` -------------------------------- ### Navigate and Open Project in Xcode Source: https://github.com/twostraws/ignite/blob/main/README.md Commands to change the current directory to the newly created Ignite project ('YourSite') and then open the 'Package.swift' file in Xcode for development. ```shell cd YourSite open Package.swift ``` -------------------------------- ### Create New Ignite Site with CLI Source: https://github.com/twostraws/ignite/blob/main/README.md Command to create a new Ignite project named 'YourSite'. After execution, it provides instructions to navigate into the project directory and open the package manifest in Xcode. ```shell ignite new YourSite ``` -------------------------------- ### Basic Ignite UI Elements Source: https://github.com/twostraws/ignite/blob/main/README.md Demonstrates fundamental Ignite UI components that resemble SwiftUI syntax. Includes creating text, styled text with Markdown, links, dividers, and images with accessibility labels. ```swift Text("Swift rocks") .font(.title1) Text(markdown: "Add *inline* Markdown") .foregroundStyle(.secondary) Link("Swift", target: "https://www.swift.org") .linkStyle(.button) Divider() Image("logo.jpg") .accessibilityLabel("The Swift logo.") .padding() ``` -------------------------------- ### Build Ignite Site with CLI Source: https://github.com/twostraws/ignite/blob/main/README.md Command to build the Ignite website. This process converts Swift code and Markdown content into static HTML files, placing them in the 'Build' folder. ```shell ignite build ``` -------------------------------- ### Import Ignite in Swift Source: https://github.com/twostraws/ignite/blob/main/README.md This snippet shows how to import the Ignite framework into your Swift code, which is necessary for using Ignite's features to build your website. ```swift import Ignite ``` -------------------------------- ### Custom Article Layout in Swift Source: https://github.com/twostraws/ignite/blob/main/README.md Defines a custom layout for rendering Markdown articles using the ArticlePage protocol. It displays the article title, an optional image, tags, word count, and reading time, followed by the article's main text. ```swift import Foundation import Ignite struct CustomArticleLayout: ArticlePage { var body: some HTML { Text(article.title) .font(.title1) if let image = article.image { Image(image, description: article.imageDescription) .resizable() .cornerRadius(20) .frame(maxHeight: 300) } if let tags = article.tags { Section { Text("Tagged with: \(tags.joined(separator: ", "))") Text("\(article.estimatedWordCount) words; \(article.estimatedReadingMinutes) minutes to read.") } } Text(article.text) } } ``` -------------------------------- ### Ignite Accordion Component Source: https://github.com/twostraws/ignite/blob/main/README.md Illustrates the creation of an accordion component in Ignite, allowing content to be shown or hidden. It supports multiple items, custom content within each item, and different open modes like '.individual'. ```swift Accordion { Item("First", startsOpen: true) { Text("This item will start open by default.") } Item("Second") { Text("This is the second accordion item.") } Item("Third") { Text("This is the third accordion item.") } } .openMode(.individual) ``` -------------------------------- ### Ignite Dropdown Button Source: https://github.com/twostraws/ignite/blob/main/README.md Shows how to create a dropdown button component in Ignite. The dropdown can contain links, dividers, and text, and can be styled with roles like '.primary'. ```swift Dropdown("Click Me") { Link("Accordions", target: AccordionExamples()) Link("Carousels", target: CarouselExamples()) Divider() Text("Or you can just…") Link("Go back home", target: "/") } .role(.primary) ``` -------------------------------- ### Add Custom Layout to Site in Swift Source: https://github.com/twostraws/ignite/blob/main/README.md Demonstrates how to register a custom layout (CustomArticleLayout) within your Ignite site's configuration by adding it to the `articlePages` property of the Site struct. ```swift struct ExampleSite: Site { var name = "Hello World" var url = URL(static: "https://www.example.com") var homePage = Home() var layout = MyLayout() /* This part adds the custom layout */ var articlePages: [any ArticlePage] { CustomArticleLayout() } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.