This document defines the schema and authoring rules for SQLPage documentation. All documentation is authored in Markdown with minimal YAML frontmatter, avoiding duplication of data that can be derived from file paths.
- No Duplication: Names, slugs, and dates are derived from file paths, not duplicated in frontmatter
- Markdown-First: Content is primarily in Markdown with structured sections
- SQLite-Backed: All documentation is compiled into a single
docs.sqlitedatabase - Validation: All content is validated against this schema
docs/
├── _schema.md # This file
├── components/ # Component documentation
│ └── {component}.md
├── functions/ # Function documentation
│ └── {function}.md
├── guides/ # User guides and tutorials
│ └── {topic}/index.md or {topic}.md
├── blog/ # Blog posts
│ └── YYYY-MM-DD-{slug}.md
├── configuration/ # Configuration documentation
│ └── {topic}.md
└── architecture/ # Architecture documentation
└── {topic}.md
Filename: {component}.md (e.g., form.md → name=form)
Frontmatter (YAML):
icon(optional): Tabler icon nameintroduced_in_version(optional): Version when component was introduceddeprecated_in_version(optional): Version when component was deprecateddifficulty(optional):beginner|intermediate|advanced
Required Sections (in order):
- Overview: Brief description of the component
- When to Use: Guidance on when to use this component
- Basic Usage: SQL example showing basic usage
- Top-Level Parameters: Markdown table of top-level parameters
- Row-Level Parameters: Markdown table of row-level parameters
- Examples: Additional SQL examples
- Related: Links to related components, functions, or guides
- Changelog: Version history and changes
Parameter Tables Format:
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| name | TEXT | Yes | - | Parameter description |Filename: {function}.md (e.g., cookie.md → name=cookie)
Frontmatter (YAML):
namespace(optional): Defaultsqlpageicon(optional): Tabler icon namereturn_type(optional): Return type descriptionintroduced_in_version(optional): Version when function was introduceddeprecated_in_version(optional): Version when function was deprecatedcategory(optional): Function categorydifficulty(optional):beginner|intermediate|advanced
Required Sections (in order):
- Signature: Fenced code block with function signature
- Description: What the function does
- Parameters: Table or H3 per parameter
- Return Value: What the function returns
- Security Notes: Security considerations (if relevant)
- Examples: SQL examples showing usage
- Related: Links to related functions, components, or guides
Signature Format:
function_name(param1 TYPE, param2 TYPE) -> RETURN_TYPEFilename: {topic}/index.md or {topic}.md (slug derived from path)
Frontmatter (YAML):
title(required): Guide titledifficulty(optional):beginner|intermediate|advancedestimated_time(optional): Time estimate (e.g., "15 minutes")introduced_in_version(optional): Version when guide was introducedcategories(optional): Array of categoriestags(optional): Array of tagsprerequisites(optional): Array of prerequisite guide slugsnext(optional): Array of next guide slugs
Content: Free-form Markdown content
Filename: YYYY-MM-DD-{slug}.md (date and slug derived from filename)
Frontmatter (YAML):
title(required): Blog post titleauthor(optional): Author nametags(optional): Array of tagscategories(optional): Array of categoriesfeatured(optional): Boolean, default falsepreview_image(optional): URL to preview imageexcerpt(optional): Short excerpt for listings
Content: Free-form Markdown content
Filename: {topic}.md (slug derived from path)
Frontmatter (YAML):
title(required): Page titleintroduced_in_version(optional): Version when configuration was introducedcategories(optional): Array of categoriestags(optional): Array of tags
Required Sections:
- Settings: Markdown table of configuration settings (if applicable)
Settings Table Format:
| Setting | Type | Required | Default | Description |
|---------|------|----------|---------|-------------|
| DATABASE_URL | TEXT | Yes | - | Database connection string |Filename: {topic}.md (slug derived from path)
Frontmatter (YAML):
title(optional): Page titletags(optional): Array of tagslast_reviewed(optional): ISO8601 datelast_updated(optional): ISO8601 date
Content: Free-form Markdown content
All SQL examples must use fenced code blocks with sql language identifier:
SELECT * FROM users WHERE active = 1;- Required Fields: All required frontmatter fields must be present
- Required Sections: All required sections must be present in the correct order
- Version Format: Version strings must follow semantic versioning (e.g., "0.1.0")
- No Duplicates: No duplicate component/function names or guide slugs
- Internal Links: All internal links must resolve to existing content
- SQL Syntax: All SQL code blocks must be syntactically valid
- Table Format: Parameter and settings tables must follow the specified format
The documentation is compiled into a SQLite database with the following main tables:
components- Component documentationcomponent_parameters- Component parameters (top-level and row-level)component_examples- Component examplesfunctions- Function documentationfunction_parameters- Function parametersfunction_examples- Function examplesguides- Guide documentationblog_posts- Blog post documentationconfiguration_pages- Configuration documentationconfiguration_settings- Configuration settingssearch_index- Full-text search index
See the main specification for detailed table schemas.