Workspaces

The apps and packages arrays define metadata for your monorepo's services and libraries. This metadata drives the home page, landing page cards, and introduction content.

Defining workspace items

import { defineConfig } from 'zpress'

export default defineConfig({
  apps: [
    {
      text: 'API',
      icon: 'devicon:hono',
      iconColor: 'blue',
      description: 'REST API with typed routes',
      tags: ['hono', 'typescript', 'node'],
      docsPrefix: '/apps/api',
    },
    {
      text: 'Console',
      icon: 'devicon:react',
      iconColor: 'purple',
      description: 'Admin dashboard',
      tags: ['react', 'vite'],
      docsPrefix: '/apps/console',
    },
  ],
  packages: [
    {
      text: 'SDK',
      description: 'TypeScript client SDK',
      tags: ['typescript', 'npm'],
      docsPrefix: '/packages/sdk',
    },
  ],
  sections: [
    { text: 'Getting Started', link: '/getting-started', from: 'docs/getting-started.md' },
  ],
})

Fields

FieldTypeRequiredDescription
textstringyesDisplay name
iconstringnoIconify identifier
iconColorstringnoCSS class suffix for icon color
descriptionstringyesShort description for cards
tagsstring[]noTechnology tags (kebab-case)
badge{ src: string; alt: string }noDeploy badge image
docsPrefixstringyesDocs path prefix matching sections

How it works

Workspace items are matched to sections by docsPrefix. When a section's link or prefix matches a workspace item's docsPrefix, the workspace metadata is injected into that section's auto-generated landing page as a card.

Cards display:

  • Icon with color styling
  • Scope label (derived from path, e.g. apps/)
  • Name and description
  • Technology tag badges
  • Optional deploy badge

Landing pages

Sections with children but no explicit page source automatically get a generated landing page. When workspace metadata matches, the landing page uses workspace-style cards. Without workspace metadata, sections use simpler section cards with descriptions extracted from child page frontmatter.

See the Landing Pages guide for details on auto-generated pages, section cards, and overview file promotion.