Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
77 changes: 77 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Deploy Documentation

on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build documentation
run: pnpm docs:build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ Thumbs.db
# ObjectUI specific
*.umd.js
*.esm.js

# VitePress build output
docs/.vitepress/dist
docs/.vitepress/cache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A high-performance, schema-driven UI system built on **React 18**, **Tailwind CS
[![CI](https://github.com/objectql/object-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/objectql/object-ui/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

[Documentation](https://objectui.org) ยท [Playground](https://object-ui.org/playground) ยท [Report Bug](https://github.com/objectql/object-ui/issues)
[Documentation](https://www.objectui.org) ยท [Playground](https://www.objectui.org/playground) ยท [Report Bug](https://github.com/objectql/object-ui/issues)

</div>

Expand Down
84 changes: 84 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Object UI",
description: "The Modular Interface Engine for the Enterprise",
base: '/',
ignoreDeadLinks: true,

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: '/logo.svg',

nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/introduction' },
{ text: 'Roadmap', link: '/ROADMAP' },
{ text: 'Protocol', link: '/protocol/overview' },
{ text: 'API', link: '/api/core' }
],

sidebar: {
'/guide/': [
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/guide/introduction' },
{ text: 'Quick Start', link: '/guide/quick-start' },
{ text: 'Installation', link: '/guide/installation' }
]
},
{
text: 'Core Concepts',
items: [
{ text: 'Schema Rendering', link: '/guide/schema-rendering' },
{ text: 'Component Registry', link: '/guide/component-registry' },
{ text: 'Expression System', link: '/guide/expressions' }
]
}
],

'/protocol/': [
{
text: 'Protocol Specifications',
items: [
{ text: 'Overview', link: '/protocol/overview' },
{ text: 'Object', link: '/protocol/object' },
{ text: 'View', link: '/protocol/view' },
{ text: 'Page', link: '/protocol/page' },
{ text: 'Form', link: '/protocol/form' },
{ text: 'Menu', link: '/protocol/menu' },
{ text: 'App', link: '/protocol/app' },
{ text: 'Report', link: '/protocol/report' }
]
}
],

'/api/': [
{
text: 'API Reference',
items: [
{ text: 'Core', link: '/api/core' },
{ text: 'React', link: '/api/react' },
{ text: 'Components', link: '/api/components' },
{ text: 'Designer', link: '/api/designer' }
]
}
]
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/objectql/object-ui' }
],

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright ยฉ 2024-present ObjectQL'
},

search: {
provider: 'local'
}
}
})
81 changes: 81 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Object UI Documentation

This directory contains the VitePress documentation site for Object UI.

## Development

Start the development server:

```bash
pnpm docs:dev
```

Visit `http://localhost:5173` to see the site.

## Building

Build the documentation:

```bash
pnpm docs:build
```

The built site will be in `docs/.vitepress/dist/`.

Preview the built site:

```bash
pnpm docs:preview
```

## Deployment

The documentation is automatically deployed to GitHub Pages when changes are pushed to the main branch.

See `.github/workflows/deploy-docs.yml` for the deployment configuration.

## Structure

```
docs/
โ”œโ”€โ”€ .vitepress/
โ”‚ โ”œโ”€โ”€ config.mts # VitePress configuration
โ”‚ โ””โ”€โ”€ dist/ # Build output (generated)
โ”œโ”€โ”€ guide/ # User guides
โ”‚ โ”œโ”€โ”€ introduction.md
โ”‚ โ”œโ”€โ”€ quick-start.md
โ”‚ โ””โ”€โ”€ installation.md
โ”œโ”€โ”€ protocol/ # Protocol specifications
โ”‚ โ”œโ”€โ”€ overview.md
โ”‚ โ”œโ”€โ”€ object.md
โ”‚ โ”œโ”€โ”€ view.md
โ”‚ โ””โ”€โ”€ ...
โ”œโ”€โ”€ api/ # API documentation
โ”‚ โ”œโ”€โ”€ core.md
โ”‚ โ”œโ”€โ”€ react.md
โ”‚ โ”œโ”€โ”€ components.md
โ”‚ โ””โ”€โ”€ designer.md
โ”œโ”€โ”€ index.md # Homepage
โ”œโ”€โ”€ roadmap.md # Public roadmap
โ””โ”€โ”€ package.json # Docs workspace config
```

## Adding Content

### New Guide Page

1. Create a new `.md` file in `guide/`
2. Add it to the sidebar in `.vitepress/config.mts`

### New Protocol Spec

1. Create a new `.md` file in `protocol/`
2. Add it to the protocol sidebar section in `.vitepress/config.mts`

## Customization

Edit `.vitepress/config.mts` to customize:
- Navigation menu
- Sidebar structure
- Site metadata
- Theme settings
Loading
Loading