content.config.ts
Complete reference for the Ginko Docs content factory, generated collections, sources, routes, schemas, and agent metadata.
content.config.ts defines which files belong to the site and which public routes Ginko Content derives from them. Ginko Docs exports one factory that creates the supported docs-only or docs-and-blog model.
import { defineGinkoDocsConfig } from "@lupinum/ginko-docs/content";
export default defineGinkoDocsConfig({
site: {
name: { en: "Example Docs", de: "Example Docs" },
description: {
en: "Documentation for Example.",
de: "Dokumentation für Example.",
},
url: "https://docs.example.com",
},
locales: ["en", "de"],
blog: true,
});Factory options
interface GinkoDocsContentOptions {
site: {
name: string | { en: string; de: string };
description: string | { en: string; de: string };
url: string;
};
locales?: readonly ["en"] | readonly ["en", "de"];
blog?: boolean;
}| Option | Type | Default | Effect |
|---|---|---|---|
site.name | string or { en: string; de: string } | required | Localized site title in agent-readable metadata |
site.description | string or { en: string; de: string } | required | Localized site description in agent-readable metadata |
site.url | string | required | Absolute origin used for agent-readable links |
locales | ['en'] or ['en', 'de'] | ['en'] | Exact supported content layout; every other value throws at the boundary |
blog | boolean | false | Adds the blog and authors collections and keeps blog routes enabled |
Generated collections
The factory always creates docs. It adds blog and authors only when blog: true.
| Collection | Type | Source | Collection route mount | Sitemap | Agent Markdown |
|---|---|---|---|---|---|
docs | page | Depends on locale mode | /docs in English; /dokumentation in German | Yes | Section optional |
blog | page | 2.blog/*.md | /blog | Yes | Section blog |
authors | data | authors/**/*.json | None | No | No |
All three collections use strict: true. Invalid documents stop ingestion instead of passing through with a warning.
Single-locale sources
In the supported English-only mode, the docs source is independent of the localized content tree:
content/
├── docs/**/*.md
├── 2.blog/*.md # only with blog: true
└── authors/**/*.json # only with blog: trueDocs mount at /docs and blog posts at /blog. Collection-level i18n is left unset.
Bilingual sources
With more than one locale, collection i18n is enabled and the factory uses these locale-relative globs:
content/
├── en/
│ ├── 1.docs/**/*.md
│ ├── 2.blog/*.md # only with blog: true
│ └── authors/**/*.json # only with blog: true
└── de/
├── 1.dokumentation/**/*.md
├── 2.blog/*.md # only with blog: true
└── authors/**/*.json # only with blog: trueThe exact docs source pattern is {1.docs,1.dokumentation}/**/*.md. Route mounts are /docs for en and /dokumentation for de. The blog route is /blog in both locales.
With the supported English-default Nuxt I18n strategy, the resulting public docs roots are /docs and /de/dokumentation.
Generated agent configuration
The factory derives the agent site from site, enables metadata frontmatter, and includes these fields in order:
title, description, url, route, locale, section, collection, source, updatedIt creates the localized optional section with order 100. With blog: true, it also creates the localized blog section with order 40. Landing pages remain app-owned and are not duplicated as synthetic content entries.
Collection invariants
The generated model deliberately keeps one source of truth:
docsandblogare route-backed page collections.authorsis queryable data and never receives a public route, sitemap entry, or agent page.- Docs and blog pages opt into normalized raw Markdown,
llms.txt, andllms-full.txt. - Drafts remain visible during development but are excluded from production agent output and public navigation.
- Partials do not become public pages.
Use defineGinkoDocsConfig() as the complete content configuration. Re-declaring its collections beside it creates competing schemas and route policies.