Files
SpacetimeDB/docs/sidebars.ts
Tyler Cloutier 5e280a4b30 Remove redundant H1 headings and improve sidebar structure
- Remove H1 headings from all docs (Docusaurus auto-generates from
  frontmatter title)
- Add sidebar_label for quickstarts to show short names in sidebar
  while keeping descriptive page titles
- Restructure Unity/Unreal tutorials: rename overview.md to index.md
  so clicking category goes directly to overview content
- Add links to Quickstarts and Tutorials categories to enable chevrons
2026-01-08 18:28:05 -05:00

106 lines
3.2 KiB
TypeScript

import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const sidebars: SidebarsConfig = {
sidebar: [
// Ask AI Chat - direct doc link at top level with star icon styling
{
type: 'doc',
id: 'ask-ai/ask-ai',
label: 'Ask AI Chat',
className: 'sidebar-ask-ai',
},
// Intro section header
{
type: 'html',
value: '<div class="spacetime-menu-header">Intro</div>',
defaultStyle: false,
},
// Flatten Getting Started items directly under Intro
{ type: 'autogenerated', dirName: '00100-intro/00100-getting-started' },
{
type: 'category',
label: 'Quickstarts',
collapsed: true,
link: { type: 'doc', id: 'intro/quickstarts/react' },
items: [{ type: 'autogenerated', dirName: '00100-intro/00200-quickstarts' }],
},
{
type: 'category',
label: 'Tutorials',
collapsed: true,
link: { type: 'doc', id: 'intro/tutorials/chat-app' },
items: [{ type: 'autogenerated', dirName: '00100-intro/00300-tutorials' }],
},
// Core Concepts section header
{
type: 'html',
value: '<div class="spacetime-menu-header">Core Concepts</div>',
defaultStyle: false,
},
{
type: 'category',
label: 'Databases',
collapsed: true,
link: { type: 'doc', id: 'core-concepts/databases' },
items: [{ type: 'autogenerated', dirName: '00200-core-concepts/00100-databases' }],
},
{
type: 'category',
label: 'Functions',
collapsed: true,
link: { type: 'doc', id: 'core-concepts/functions' },
items: [{ type: 'autogenerated', dirName: '00200-core-concepts/00200-functions' }],
},
{
type: 'category',
label: 'Tables',
collapsed: true,
link: { type: 'doc', id: 'core-concepts/tables' },
items: [{ type: 'autogenerated', dirName: '00200-core-concepts/00300-tables' }],
},
{
type: 'category',
label: 'Subscriptions',
collapsed: true,
link: { type: 'doc', id: 'core-concepts/subscriptions' },
items: [{ type: 'autogenerated', dirName: '00200-core-concepts/00400-subscriptions' }],
},
{
type: 'category',
label: 'SpacetimeAuth',
collapsed: true,
link: { type: 'doc', id: 'core-concepts/spacetime-auth' },
items: [{ type: 'autogenerated', dirName: '00200-core-concepts/00500-spacetime-auth' }],
},
{
type: 'category',
label: 'Client SDKs',
collapsed: true,
link: { type: 'doc', id: 'core-concepts/client-sdk-languages' },
items: [{ type: 'autogenerated', dirName: '00200-core-concepts/00600-client-sdk-languages' }],
},
// Developer Resources section header
{
type: 'html',
value: '<div class="spacetime-menu-header">Developer Resources</div>',
defaultStyle: false,
},
{
type: 'category',
label: 'How To',
collapsed: true,
items: [{ type: 'autogenerated', dirName: '00300-resources/00100-how-to' }],
},
{
type: 'category',
label: 'References',
collapsed: true,
items: [{ type: 'autogenerated', dirName: '00300-resources/00200-reference' }],
},
],
};
export default sidebars;