Project Structure
A sourcey project is a directory containing a sourcey.config.ts and your content files. There's no required folder hierarchy; sourcey resolves everything relative to the config file.
Typical layout
my-docs/
sourcey.config.ts # site config (required)
introduction.md # markdown pages
quickstart.md
concepts.md
guides/
authentication.md
webhooks.md
openapi.yaml # OpenAPI spec (optional)
logo.png # logo image (optional)
dist/ # build output (generated)Config resolution
Sourcey looks for sourcey.config.ts in the current working directory when you run sourcey build or sourcey dev. All paths in the config are resolved relative to this file.
// These are relative to the directory containing sourcey.config.ts
openapi: "./specs/api.yaml",
logo: "./assets/logo.png",Page resolution
Pages are referenced by slug in the config. Sourcey looks for a .md or .mdx file matching that slug in the config directory.
groups: [{
group: "Getting Started",
pages: ["introduction", "quickstart"],
// Resolves to: introduction.md, quickstart.md
}]Glob patterns are supported. "guides/*" expands to all .md and .mdx files in the guides/ directory, sorted alphabetically.
Page slugs must be unique across all groups within a tab. Duplicate slugs cause a build error.
Output structure
After running sourcey build, the output directory contains standalone HTML files, a CSS file, a JavaScript file for client-side search and dark mode, and a search index.
dist/
index.html # redirect to first page
introduction.html
quickstart.html
concepts.html
guides/
authentication.html
webhooks.html
api/
index.html # API reference (if openapi tab configured)
sourcey.css
sourcey.js
search-index.jsonEvery HTML file is self-contained. No framework runtime, no module loading, no hydration step.
