Skip to content

Commit c301846

Browse files
cadamsdotcomclaude
andcommitted
Migrate documentation site from Pandoc to Docusaurus
Replace the single-page Pandoc build with a Docusaurus site in docs-site/. Each of the 9 markdown chapters is now its own page with sidebar navigation, prev/next links, and search. The landing page (site/index.html) is converted to a React component using Docusaurus Layout. - Scaffold Docusaurus in docs-site/ with isolated package.json - Migrate 9 chapters with frontmatter, fix cross-chapter links - Convert landing page to src/pages/index.tsx with CSS modules - Update GitHub Actions workflow for Docusaurus build - Update root configs (.gitignore, .dockerignore, .pre-commit-config.yaml) - Remove old docs/, site/, and root CNAME Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 15f800e commit c301846

30 files changed

Lines changed: 19671 additions & 1005 deletions

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tests/
3333

3434
# Documentation
3535
*.md
36-
docs/
36+
docs-site/
3737
LICENSE
3838

3939
# IDE

.github/workflows/pages.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy GitHub Pages
22
on:
33
push:
44
branches: [main]
5-
paths: [site/**, docs/**, .github/workflows/pages.yml]
5+
paths: [docs-site/**, .github/workflows/pages.yml]
66
workflow_dispatch:
77

88
permissions:
@@ -18,19 +18,20 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21-
- name: Install Pandoc
22-
run: sudo apt-get install -y pandoc
23-
- name: Build docs
24-
run: make -C docs html
25-
- name: Assemble site
26-
run: |
27-
mkdir -p _site/docs
28-
cp site/index.html _site/
29-
cp docs/build/* _site/docs/
30-
cp CNAME _site/ 2>/dev/null || true
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: npm
25+
cache-dependency-path: docs-site/package-lock.json
26+
- name: Install dependencies
27+
run: npm ci
28+
working-directory: docs-site
29+
- name: Build
30+
run: npm run build
31+
working-directory: docs-site
3132
- uses: actions/upload-pages-artifact@v3
3233
with:
33-
path: _site
34+
path: docs-site/build
3435

3536
deploy:
3637
needs: build

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,3 @@ supabase/config.toml
3232
# TDD guard logs (session artifacts)
3333
tdd.log
3434
tdd-*.log
35-
36-
# Documentation build output
37-
docs/build/
38-
_site/

docs-site/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs-site/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```bash
8+
yarn
9+
```
10+
11+
## Local Development
12+
13+
```bash
14+
yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```bash
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
Using SSH:
30+
31+
```bash
32+
USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```bash
38+
GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Agent Optimizations
1+
---
2+
title: 'Agent Optimizations'
3+
sidebar_position: 5
4+
---
25

36
CodeLeash configures Claude Code to prevent common agent misbehaviors through deny rules, hooks, and environment settings. These are defined in [`.claude/settings.json`](https://github.com/cadamsdotcom/CodeLeash/blob/main/.claude/settings.json) and enforced automatically.
47

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Code Quality Checks
1+
---
2+
title: 'Code Quality Checks'
3+
sidebar_position: 6
4+
---
25

36
CodeLeash enforces code quality through custom Python scripts that run as pre-commit hooks. Each script is a focused lint rule implemented with AST walking, regex scanning, or both. This "Python script as lint rule" pattern makes rules easy to write, test, and understand.
47

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Full-Stack Monorepo
1+
---
2+
title: 'Full-Stack Monorepo'
3+
sidebar_position: 2
4+
---
25

36
CodeLeash runs Vite and FastAPI as a single application. In development, two servers run concurrently with hot module replacement. In production, Vite builds static assets and FastAPI serves everything.
47

@@ -17,7 +20,7 @@ concurrently -n vite,uvicorn,worker \
1720
1821
- **Vite** (port 5173) serves JavaScript/CSS with HMR
1922
- **Uvicorn** (port 8000) serves HTML pages and API routes
20-
- **Worker** processes background jobs (see [Worker System](06-worker-system.md))
23+
- **Worker** processes background jobs (see [Worker System](./worker-system.md))
2124

2225
In production (`npm run build` then `uv run uvicorn main:app`), Vite compiles assets into `dist/` and FastAPI serves them directly using the Vite manifest for cache-busted URLs.
2326

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Future & Community
1+
---
2+
title: 'Future & Community'
3+
sidebar_position: 9
4+
---
25

36
## Migration Testing Framework
47

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# How Tests Work
1+
---
2+
title: 'How Tests Work'
3+
sidebar_position: 4
4+
---
25

36
CodeLeash has three test levels --- unit, integration, and end-to-end --- plus frontend component tests via Vitest. The full suite runs automatically on every git commit via a pre-commit hook installed by [`init.sh`](https://github.com/cadamsdotcom/CodeLeash/blob/main/init.sh).
47

0 commit comments

Comments
 (0)