Skip to content

Commit dce9fd2

Browse files
authored
Merge pull request #2 from eSolia/feat/cf-workers-starlight-docs
feat(docs): migrate docs site to Cloudflare Workers + Astro Starlight
2 parents 0299243 + b9c286d commit dce9fd2

281 files changed

Lines changed: 7488 additions & 74697 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs-deploy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Build and deploy the Marquis documentation site to Cloudflare Workers.
2+
3+
name: Deploy Docs Site
4+
5+
on:
6+
push:
7+
branches: [main]
8+
paths:
9+
- 'docs-site/**'
10+
- 'mod.ts'
11+
- 'index.ts'
12+
- 'ui/**'
13+
- 'tokens/**'
14+
- 'utils/**'
15+
- '.github/workflows/docs-deploy.yml'
16+
release:
17+
types: [published]
18+
workflow_dispatch:
19+
20+
permissions:
21+
contents: read
22+
23+
concurrency:
24+
group: docs-deploy-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
deploy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Deno
35+
uses: denoland/setup-deno@v2
36+
with:
37+
deno-version: '2.x'
38+
39+
- name: Setup Node
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: '22'
43+
cache: 'npm'
44+
cache-dependency-path: docs-site/package-lock.json
45+
46+
- name: Generate API reference (deno doc)
47+
run: deno task doc
48+
49+
- name: Install docs-site dependencies
50+
working-directory: docs-site
51+
run: npm ci
52+
53+
- name: Build Starlight site
54+
working-directory: docs-site
55+
run: npm run build
56+
57+
- name: Deploy to Cloudflare Workers
58+
working-directory: docs-site
59+
env:
60+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
61+
run: npx wrangler deploy

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Thumbs.db
1818
dist/
1919
*.js.map
2020

21+
# Generated API reference (deno doc --html, regenerated by CI)
22+
docs/api/
23+
2124
# Coverage
2225
coverage/
2326
.nyc_output/

README.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# Marquis
22

3+
[![JSR](https://jsr.io/badges/@esolia/marquis)](https://jsr.io/@esolia/marquis)
4+
[![Documentation](https://img.shields.io/badge/docs-cloudflare-orange)](https://marquis-docs.esolia.workers.dev/)
5+
36
**Marquis** — eSolia's UI component library. A vanilla TypeScript component library providing
47
polished, professional UI components that work with Tailwind CSS and require no framework.
58

69
_The name evokes "marquee" (prominent display) and "marque" (brand mark) — fitting for a library
710
focused on visual presentation and brand consistency._
811

12+
📚 **Documentation:** [marquis-docs.esolia.workers.dev](https://marquis-docs.esolia.workers.dev/)
13+
914
## Features
1015

1116
- **Framework-agnostic**: Works with vanilla TypeScript, Deno, and any templating system
@@ -101,31 +106,31 @@ const actions = createActionGroup([
101106

102107
## Components
103108

104-
| Component | Description |
105-
| -------------- | --------------------------------------------------------- |
106-
| **Badge** | Status/label badges with semantic variants |
107-
| **Button** | Buttons with primary, secondary, ghost, danger variants |
108-
| **IconButton** | Square icon buttons for row actions |
109-
| **Card** | Container cards with multiple styles |
110-
| **StatCard** | Dashboard metric display cards |
111-
| **Table** | Table styling utilities |
112-
| **Tabs** | Tab groups with counts and icons |
113-
| **FilterBar** | Filter controls (select, search, buttons) |
114-
| **Dropdown** | CSS-only dropdown menus (no JavaScript required) |
115-
| **Alert** | Contextual feedback messages (info/success/warning/error) |
116-
| **Header** | Application header with nav, language switcher, user menu |
117-
| **Code** | Inline code, code blocks, and keyboard shortcuts (kbd) |
118-
| **Spinner** | Loading indicators with multiple sizes and variants |
109+
| Component | Description |
110+
| -------------- | -------------------------------------------------------------------- |
111+
| **Badge** | Status/label badges with semantic variants |
112+
| **Button** | Buttons with primary, secondary, ghost, danger variants |
113+
| **IconButton** | Square icon buttons for row actions |
114+
| **Card** | Container cards with multiple styles |
115+
| **StatCard** | Dashboard metric display cards |
116+
| **Table** | Table styling utilities |
117+
| **Tabs** | Tab groups with counts and icons |
118+
| **FilterBar** | Filter controls (select, search, buttons) |
119+
| **Dropdown** | CSS-only dropdown menus (no JavaScript required) |
120+
| **Alert** | Contextual feedback messages (info/success/warning/error) |
121+
| **Header** | Application header with nav, language switcher, user menu |
122+
| **Code** | Inline code, code blocks, and keyboard shortcuts (kbd) |
123+
| **Spinner** | Loading indicators with multiple sizes and variants |
119124
| **Progress** | Progress bars (linear/circular) with determinate/indeterminate modes |
120-
| **Toggle** | Toggle switches with labels, descriptions, and CSS-only mode |
121-
| **Skeleton** | Loading placeholder animations for content |
122-
| **Avatar** | User avatars with initials fallback and status indicators |
123-
| **Toast** | Non-intrusive notification messages with auto-dismiss |
125+
| **Toggle** | Toggle switches with labels, descriptions, and CSS-only mode |
126+
| **Skeleton** | Loading placeholder animations for content |
127+
| **Avatar** | User avatars with initials fallback and status indicators |
128+
| **Toast** | Non-intrusive notification messages with auto-dismiss |
124129

125130
## Server-Side Rendering (CSS-Only Components)
126131

127-
Some components provide CSS functions for server-rendered HTML where JavaScript interactivity
128-
isn't available. Include these CSS snippets in your page's `<style>` section.
132+
Some components provide CSS functions for server-rendered HTML where JavaScript interactivity isn't
133+
available. Include these CSS snippets in your page's `<style>` section.
129134

130135
### Toggle CSS
131136

@@ -156,14 +161,14 @@ The toggle responds to checkbox state via CSS `peer:checked` selectors.
156161

157162
### Other CSS Functions
158163

159-
| Function | Component | Purpose |
160-
|----------|-----------|---------|
161-
| `getSpinnerCSS()` | Spinner | Rotation animation |
162-
| `getProgressCSS()` | Progress | Indeterminate animations |
163-
| `getSkeletonCSS()` | Skeleton | Pulse/wave animations |
164-
| `getDropdownCSS()` | Dropdown | Hover/focus visibility |
165-
| `getToastCSS()` | Toast | Slide-in animations |
166-
| `getToggleCSS()` | Toggle | Checkbox-based state |
164+
| Function | Component | Purpose |
165+
| ------------------ | --------- | ------------------------ |
166+
| `getSpinnerCSS()` | Spinner | Rotation animation |
167+
| `getProgressCSS()` | Progress | Indeterminate animations |
168+
| `getSkeletonCSS()` | Skeleton | Pulse/wave animations |
169+
| `getDropdownCSS()` | Dropdown | Hover/focus visibility |
170+
| `getToastCSS()` | Toast | Slide-in animations |
171+
| `getToggleCSS()` | Toggle | Checkbox-based state |
167172

168173
## Design Tokens
169174

deno.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"lineWidth": 100,
1515
"indentWidth": 2,
1616
"singleQuote": true,
17-
"exclude": ["docs/api"]
17+
"exclude": ["docs/api", "docs-site/"]
1818
},
1919
"lint": {
2020
"rules": {
2121
"tags": ["recommended"]
2222
},
23-
"exclude": ["docs/api"]
23+
"exclude": ["docs/api", "docs-site/"]
2424
},
2525
"compilerOptions": {
2626
"strict": true,

docs-site/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
public/api/
5+
.wrangler/
6+
.env
7+
.env.local
8+
.DS_Store

docs-site/astro.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { defineConfig } from "astro/config";
2+
import starlight from "@astrojs/starlight";
3+
4+
export default defineConfig({
5+
site: "https://marquis-docs.esolia.workers.dev",
6+
integrations: [
7+
starlight({
8+
title: "Marquis",
9+
description:
10+
"eSolia Inc UI component library for TypeScript projects, especially on Cloudflare Workers.",
11+
social: [
12+
{ icon: "github", label: "GitHub", href: "https://github.com/eSolia/marquis" },
13+
{ icon: "jsr", label: "JSR", href: "https://jsr.io/@esolia/marquis" },
14+
],
15+
sidebar: [
16+
{ label: "Tutorials", autogenerate: { directory: "tutorials" } },
17+
{
18+
label: "API Reference",
19+
link: "/api/",
20+
attrs: { target: "_blank", rel: "noopener" },
21+
badge: { text: "deno doc", variant: "tip" },
22+
},
23+
],
24+
editLink: {
25+
baseUrl: "https://github.com/eSolia/marquis/edit/main/docs-site/",
26+
},
27+
lastUpdated: true,
28+
}),
29+
],
30+
});

0 commit comments

Comments
 (0)