Outstatic organizes content into three distinct structural components:
1. Collections
Collections act as categories or schemas that define the types of content available on your site (e.g., a Posts collection for a blog). They define the structure and are stored as folders in your repository at:
/outstatic/content/{collection}
2. Documents
Documents are the individual content entries within a Collection. For example, a blog post titled "How to raise a dragon" in a posts collection would be stored at:
/outstatic/content/posts/how-to-raise-a-dragon.mdx
Each Document includes default metadata:
- Title: The document title.
- Content: Text and images edited via the interface.
- Date: The publication date (available as
publishedAt on the frontend). - Status: Either
published or draft. - Author: GitHub name and avatar (editable).
- URL Slug: Automatically generated from the title but manually editable.
- Custom Fields: Additional data defined via schemas.
3. Singletons
Singletons are unique, one-off content items used for pages that do not repeat, such as a Homepage, About page, or Site Settings. Unlike Collections, which hold multiple documents, a Singleton exists as a single instance.
Singletons are stored in the _singletons directory:
/outstatic/content/_singletons/{singleton}.md
Custom field schemas for Singletons are stored as {slug}.schema.json within the same _singletons directory.