A documentation site from a DocC catalog – static, AI-fetchable HTML with a left sidebar and full-text search.
swift run sitekit new my-docs --blueprint DocC
cd my-docs
swift run Site serve # preview at http://localhost:8080Ships with the ocean color scheme + modern font pairing – change in Theme/theme.yaml (see references/themes.md).
Choose DocC when you have (or want) a .docc catalog – Markdown notes with DocC directives – and need it as a fast, accessible, AI-fetchable static site. Unlike DocC's own output (a client-side SPA that serves an empty shell to curl/crawlers), SiteKit renders every note to plain server-rendered HTML with:
- a left sidebar navigating the catalog (a flat Year→Session tree for WWDC-style catalogs, a flat list otherwise),
- native full-text search over the note bodies (sharded, lazy-loaded, no external service),
- DocC directive support (
@Metadata,@CallToAction,@Contributors,@Image,@Row/@Column,@TabNavigator, …) with graceful degradation – full list inreferences/markdown-extensions.md, <doc:>cross-reference resolution to internal URLs,- an optional Community↔AI variant switcher via the
<name>.ai.mdsibling convention.
For a marketing or product site, see Portfolio or AppLanding instead; for a blog, see Blog.
Sources/Site/Main.swift calls SiteBuilder.docc(configPath: "SiteConfig.yaml"). SiteConfig.yaml declares one section pointing at the .docc catalog:
sections:
- name: "Documentation"
slug: "documentation"
contentDirectory: "Documentation.docc"
urlPrefix: "documentation" # notes live under /documentation/<slug>/Drop your .docc catalog in place of the sample Documentation.docc/ (each .md file is one page). Notes render under urlPrefix; <doc:> references resolve under the same prefix.
The blueprint ships two search surfaces over one shared, sharded, lazy-loaded index (no external service):
- The ⌘K overlay – a quick-jump modal for fast navigation, with no facets and no URL of its own.
- A dedicated
/search/page at/<prefix>/search/(e.g./documentation/search/) – a first-class page you can land on, bookmark, and share. The query and facets are baked into the URL (?q=…&year=wwdc25&type=community&framework=swiftui), and three facet groups (Year, Note type, Framework) are derived from the catalog, so there are no dead chips for values that have no notes. The overlay's "See all results" footer deep-links here carrying the current query.
The /search/ page is progressively enhanced: with JavaScript disabled it still renders the search box, the facet chips, and the suggestion chips as inert markup, and the sidebar still navigates the whole catalog. Pre-populated suggestion chips ("Try: …", shown while the query is empty) come from the docc.searchSuggestions config (see references/siteconfig-reference.md).
By default the sidebar is a flat Year→Session tree for WWDC-style catalogs and a flat list otherwise. A ## Topics section curates pages into named subgroups, mirroring real Swift-DocC's ## Topics curation. Under ## Topics, each ### Group Heading followed by a @Links block (or a plain Markdown list of <doc:…> autolinks – no wrapper required) becomes one labelled group:
## Topics
### Essentials
@Links(visualStyle: list) {
- <doc:GettingStarted>
- <doc:Configuration>
}
### Guides
- <doc:Deployment>
- <doc:Theming>On a year-overview note, the groups become subgroups within that year's sidebar branch. On a loose index/root page, the listed loose pages nest under the labelled group instead of dangling in the flat list. Either form keeps year/session grouping untouched. The directive syntax is documented in full in references/markdown-extensions.md.
- Site name and base URL? (e.g. "My Docs", "https://docs.example.com")
- Author name?
- Where is the
.docccatalog? (pointcontentDirectoryat it; defaultDocumentation.docc) - URL prefix for the docs? (default
documentation, matching DocC's convention) - Color scheme / font pairing? (default ocean + modern; see
references/themes.md)