Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
558bc35
perf(packages/core): incremental sync engine — only process what changed
zrosenbauer Mar 31, 2026
69a3464
docs(repo): add architecture section to CONTRIBUTING.md
zrosenbauer Mar 31, 2026
58fd96f
docs(contributing): split architecture into focused concept docs
zrosenbauer Mar 31, 2026
452cf0f
chore: base contrib docs
zrosenbauer Mar 31, 2026
6e9e300
feat(packages/cli): migrate dev command to React/Ink TUI screen
zrosenbauer Mar 31, 2026
677877f
fix(review): address PR feedback
zrosenbauer Mar 31, 2026
d9a0c14
fix(ci): resolve lint errors
zrosenbauer Mar 31, 2026
816d335
fix(ci): include engine and references sections in contributing config
zrosenbauer Mar 31, 2026
dc1ce8f
fix(review): address PR feedback
zrosenbauer Mar 31, 2026
0a9c093
fix(review): address PR feedback
zrosenbauer Mar 31, 2026
42e8726
fix(packages/core): revert reduce spread to Object.assign with lint d…
zrosenbauer Mar 31, 2026
b8e68a5
fix(packages/cli): configure automatic JSX runtime for Rslib/SWC
zrosenbauer Mar 31, 2026
c1ae130
fix(packages/cli): add settle delay before dev server restart
zrosenbauer Mar 31, 2026
c8a074d
perf(packages/core): migrate sidebar/nav to Rspress-native _meta.json
zrosenbauer Mar 31, 2026
85ebf5c
fix(packages/core): add root _meta.json for unified sidebar
zrosenbauer Apr 1, 2026
43775aa
feat(packages/ui): add runtime sidebar scope filtering for standalone…
zrosenbauer Apr 1, 2026
d958675
feat(packages/cli): enable fullscreen mode for dev command
zrosenbauer Apr 1, 2026
39a291b
feat(packages/cli): upgrade kidd-cli to v0.20.0 and redesign dev screen
zrosenbauer Apr 1, 2026
74109dd
feat(packages/cli): add stories command and viewer integration
zrosenbauer Apr 1, 2026
50fa23f
fix(packages/cli): move story file into __stories__ directory
zrosenbauer Apr 1, 2026
f069307
refactor(packages/cli): switch commands to default exports and add ki…
zrosenbauer Apr 1, 2026
c8ec54d
fix(packages/cli): add kidd.config.ts and move story out of __stories__
zrosenbauer Apr 1, 2026
d0fffc8
perf(packages/cli): migrate build system from rslib to kidd
zrosenbauer Apr 3, 2026
8329db8
fix(packages/cli): resolve lint errors and add root stories script
zrosenbauer Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/incremental-sync-engine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@zpress/core': minor
'@zpress/cli': minor
---

Sync engine now only processes what changed instead of running a full sync on every pass.

- **mtime-based page skip**: pages whose source mtime and frontmatter hash match the previous manifest skip the entire read/transform/hash pipeline
- **Parallel page copy**: all pages are copied concurrently via `Promise.all` instead of sequential reduce
- **Parallel `copyAll`**: public asset directory copy runs in parallel
- **Asset generation skip**: banner/logo/icon SVGs skip generation entirely when the asset config hash is unchanged; `shouldGenerate` also compares content to avoid redundant writes
- **Image copy skip**: destination images are skipped when their mtime is at least as recent as the source
- **OpenAPI spec caching**: specs are only re-parsed when their file mtime changes; a shared cache persists across dev-mode sync passes and is cleared on config reload
- **Structural change detection**: `resolvedCount` mismatch between syncs forces a full resync to handle added/removed pages correctly
- **Build system migration**: switched CLI from rslib to kidd's native build system (tsdown-based), with static command imports, proper dependency externalization, and React/Ink TUI dev screen
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Write clear, concise descriptions in the imperative mood ("add feature" not "add

## Project Structure

```
```text
packages/
├── cli/ # @zpress/cli — CLI commands, watcher, Rspress integration
├── core/ # @zpress/core — config loading, sync engine, sidebar/nav generation
Expand Down
15 changes: 13 additions & 2 deletions contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Welcome to the zpress contributing docs. This directory contains standards, temp

- **Standards** define the rules -- read the relevant standard before writing code or docs.
- **Concepts** explain the "what" and "why" behind key architectural decisions.
- **References** are lookup tables for commands, flags, and APIs.
- **Guides** are step-by-step walkthroughs for common tasks.

## Table of Contents
Expand Down Expand Up @@ -38,10 +39,20 @@ Welcome to the zpress contributing docs. This directory contains standards, temp

### Concepts

- [Architecture](./concepts/architecture.md) -- Package ecosystem, sync engine, UI theme, data flow
- [CLI](./concepts/cli.md) -- Commands, dev server, file watching, build pipeline
- [Architecture](./concepts/architecture.md) -- Package ecosystem, layers, design decisions, data flow
- [Config](./concepts/config.md) -- Config system, output structure, Rspress integration
- [Engine](./concepts/engine/overview.md) -- Sync engine overview, build vs dev, key concepts
- [Pipeline](./concepts/engine/pipeline.md) -- Sync pipeline, page transformation, entry resolution
- [Incremental Sync](./concepts/engine/incremental.md) -- Mtime skipping, content hashing, structural change detection
- [OpenAPI Sync](./concepts/engine/openapi.md) -- Spec dereferencing, MDX generation, caching
- [Dev Mode](./concepts/engine/dev.md) -- File watching, debouncing, HMR, config reload

### References

- [CLI](./references/cli.md) -- Command syntax, flags, Rspress integration

### Guides

- [Getting Started](./guides/getting-started.md) -- Local setup, reading order, Claude Code configuration
- [Developing a Feature](./guides/developing-a-feature.md) -- Branch, code, test, changeset, PR, merge
- [Publishing VS Code Extension](./guides/publishing-vscode-extension.md) -- Package and publish the zpress VS Code extension
235 changes: 59 additions & 176 deletions contributing/concepts/architecture.md

Large diffs are not rendered by default.

180 changes: 0 additions & 180 deletions contributing/concepts/cli.md

This file was deleted.

84 changes: 84 additions & 0 deletions contributing/concepts/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Config

The single source of truth for the entire documentation site.

## Overview

The config file (`zpress.config.ts`) defines the information architecture -- content structure, navigation, metadata, and workspaces. It is loaded via [c12](https://github.com/unjs/c12) and validated at runtime by `loadConfig()`. Validation errors are returned as `Result` tuples; the CLI layer handles reporting and exits.

## Supported Formats

| Format | Files |
| ---------- | ----------------------------------------------- |
| TypeScript | `zpress.config.ts`, `.mts`, `.cts` |
| JavaScript | `zpress.config.js`, `.mjs`, `.cjs` |
| Data | `zpress.config.json`, `.jsonc`, `.yml`, `.yaml` |

## Shape

```ts
import { defineConfig } from '@zpress/kit'

export default defineConfig({
title: 'My Docs',
description: 'Platform documentation',
tagline: 'A short tagline for the hero section',
sections: [
/* entry tree */
],
apps: [
/* workspace items */
],
packages: [
/* workspace items */
],
nav: 'auto',
})
```

| Field | Purpose |
| ------------- | ------------------------------------------------- |
| `title` | Site title, used in hero and metadata |
| `description` | Site description for SEO |
| `tagline` | Hero section subtitle |
| `sections` | Entry tree defining the information architecture |
| `apps` | Workspace items for application docs |
| `packages` | Workspace items for shared package docs |
| `workspaces` | Custom workspace groups |
| `nav` | Top-level navigation (`'auto'` or explicit array) |

## Output Structure

The sync engine writes everything to `.zpress/`:

```tree
.zpress/
├── content/ # Synced markdown + generated MDX (Rspress root)
│ ├── index.md # Home page (auto-generated or from source)
│ ├── getting-started.md
│ ├── guides/
│ └── .generated/ # Machine-generated metadata
│ ├── sidebar.json # Multi-sidebar config
│ ├── nav.json # Top-level navigation
│ └── workspaces.json # Workspace data for home page
├── public/ # Static assets (logos, icons, banners)
├── dist/ # Build output (HTML, CSS, JS)
└── cache/ # Rspress build cache
```

Rspress's root is set to `.zpress/content/`. It never sees the original repo layout.

## Rspress Integration

`createRspressConfig()` in `@zpress/ui` bridges sync output to Rspress:

- Sets Rspress `root` to `.zpress/content/`
- Reads generated `sidebar.json`, `nav.json`, `workspaces.json` from `.generated/`
- Registers the zpress plugin (theme provider, edit-source button, mermaid, file trees)
- Configures Rsbuild aliases so generated MDX can import `@zpress/ui/theme` components

## References

- [Architecture](./architecture.md)
- [Engine](./engine/overview.md)
- [CLI Reference](../references/cli.md)
Loading
Loading