Files
OPENBUREAU/cms/openbureau.config.js
T
karim fed003ae31 cms: adopt the schema-driven editor (core update) + tune config field types
git subtree pull of openbureau-core main brings the schema-driven admin editor
(renders sidebar + fields from /api/schema, unknown frontmatter preserved on save).
openbureau.config.js color→type:'color' (swatch) and layout options text/image/icon
so the editor reproduces the previous look.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 18:36:37 +02:00

76 lines
2.8 KiB
JavaScript

// openbureau site config — what this site's content model + plugins are.
// Consumed by openbureau-core (vendored at cms/core) via CMS_CONFIG. Reproduces
// the previously hard-coded content model 1:1 (proven by core's collections test).
export default {
site: 'openbureau',
auth: 'supabase', // GoTrue/Supabase login (the stack provides it); core default
admins: ['karim@gabrielevarano.ch'],
plugins: ['dialog'], // comment/forum subsystem (library ↔ threads sync)
collections: [
{
kind: 'beitrag', label: 'Beiträge', order: 0,
path: 'archiv/:section/:slug',
sections: ['buerofuehrung', 'software', 'theorie'],
statKey: 'beitraege',
draftStatKey: 'entwuerfe', // Beitrag-Entwürfe als eigener Zähler (Dashboard)
fields: [
{ name: 'title', type: 'string', required: true },
{ name: 'section', type: 'select', options: ['buerofuehrung', 'software', 'theorie'] },
{ name: 'slug', type: 'slug' },
{ name: 'date', type: 'date' },
{ name: 'weight', type: 'number' },
{ name: 'color', type: 'color' },
{ name: 'layout', type: 'select', options: ['text', 'image', 'icon'], default: 'text' },
{ name: 'tags', type: 'list' },
{ name: 'summary', type: 'text' },
{ name: 'cover_image', type: 'image' },
{ name: 'authors', type: 'list' },
{ name: 'toc', type: 'bool' },
{ name: 'draft', type: 'bool', default: true },
{ name: 'body', type: 'markdown' },
],
},
{
kind: 'biblio', label: 'Library', order: 1,
path: 'library/:slug',
statKey: 'library',
fields: [
{ name: 'title', type: 'string', required: true },
{ name: 'slug', type: 'slug' },
{ name: 'date', type: 'date' },
{ name: 'tags', type: 'list' },
{ name: 'summary', type: 'text' },
{ name: 'cover_image', type: 'image' },
{ name: 'external', type: 'string' },
{ name: 'group', type: 'string' },
{ name: 'authors', type: 'list' },
{ name: 'draft', type: 'bool', default: true },
{ name: 'body', type: 'markdown' },
],
},
{
kind: 'rubrik', label: 'Rubriken', order: 3, index: true,
statKey: 'rubriken',
fields: [
{ name: 'title', type: 'string', required: true },
{ name: 'color', type: 'color' },
{ name: 'layout', type: 'string' },
{ name: 'weight', type: 'number' },
{ name: 'body', type: 'markdown' },
],
},
{
kind: 'seite', label: 'Seiten', order: 2, fallback: true,
statKey: 'seiten',
fields: [
{ name: 'title', type: 'string', required: true },
{ name: 'layout', type: 'string' },
{ name: 'toc', type: 'bool' },
{ name: 'draft', type: 'bool', default: true },
{ name: 'body', type: 'markdown' },
],
},
],
};