Skip to content

Commit 46f947e

Browse files
prosdevclaude
andcommitted
docs: add Nextra site with GitHub Pages deployment
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5cd64e2 commit 46f947e

23 files changed

Lines changed: 7614 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ['docs/**', '.github/workflows/docs.yml']
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: 9.15.4
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '22'
34+
cache: 'pnpm'
35+
cache-dependency-path: 'docs/pnpm-lock.yaml'
36+
37+
- name: Install dependencies
38+
working-directory: docs
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Build
42+
working-directory: docs
43+
env:
44+
BASE_PATH: /eventkit
45+
NODE_ENV: production
46+
run: pnpm build
47+
48+
- name: Setup Pages
49+
uses: actions/configure-pages@v5
50+
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v4
53+
with:
54+
path: './docs/out'
55+
56+
deploy:
57+
runs-on: ubuntu-latest
58+
needs: build
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Event ingestion and processing kit for Python.
88

99
**Philosophy**: Provide a solid starting point with battle-tested patterns, then get out of your way. Customize for your specific needs.
1010

11+
**📚 [View Full Documentation](https://prosdevlab.github.io/eventkit/)**
12+
1113
### Key Features
1214

1315
- **Flexible ingestion** - Accept any JSON payload with Segment-compatible API

docs/.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp
4+
.pnp.js
5+
6+
# Testing
7+
coverage/
8+
9+
# Next.js
10+
.next/
11+
out/
12+
dist/
13+
14+
# Production
15+
build/
16+
17+
# Misc
18+
.DS_Store
19+
*.pem
20+
21+
# Debug
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
pnpm-debug.log*
26+
27+
# Local env files
28+
.env*.local
29+
.env
30+
31+
# Vercel
32+
.vercel
33+
34+
# TypeScript
35+
*.tsbuildinfo
36+
next-env.d.ts

docs/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# eventkit Documentation Site
2+
3+
This directory contains the Nextra-based documentation site for eventkit.
4+
5+
## Development
6+
7+
```bash
8+
# Install dependencies
9+
pnpm install
10+
11+
# Start dev server
12+
pnpm dev
13+
14+
# Build for production
15+
pnpm build
16+
```
17+
18+
The dev server will start at http://localhost:3000
19+
20+
## Technology Stack
21+
22+
- **Nextra v4.0.0** - Documentation framework
23+
- **Next.js 15.1.6** - React framework
24+
- **React 19** - UI library
25+
- **pnpm** - Package manager
26+
27+
## Project Structure
28+
29+
```
30+
docs/
31+
├── app/ # Next.js app directory
32+
│ ├── layout.tsx # Root layout with navigation
33+
│ └── [[...mdxPath]]/ # Dynamic MDX page routing
34+
├── content/ # MDX documentation files
35+
│ ├── _meta.json # Navigation structure
36+
│ └── *.mdx # Documentation pages
37+
├── public/ # Static assets
38+
├── next.config.mjs # Next.js configuration
39+
├── tsconfig.json # TypeScript configuration
40+
└── package.json # Dependencies and scripts
41+
```
42+
43+
## Deployment
44+
45+
The site is automatically deployed to GitHub Pages at https://prosdevlab.github.io/eventkit/ when changes are pushed to the `main` branch.
46+
47+
## Adding Content
48+
49+
1. Create an MDX file in `content/`
50+
2. Add navigation entry to `content/_meta.json`
51+
3. Write content using MDX syntax
52+
4. Test locally with `pnpm dev`
53+
54+
See [Nextra documentation](https://nextra.site/) for more details on MDX features and components.

docs/app/[[...mdxPath]]/page.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { generateStaticParamsFor, importPage } from 'nextra/pages';
2+
import { useMDXComponents } from 'nextra-theme-docs';
3+
4+
export const generateStaticParams = generateStaticParamsFor('mdxPath');
5+
6+
export async function generateMetadata(props: { params: Promise<{ mdxPath?: string[] }> }) {
7+
const params = await props.params;
8+
const { metadata } = await importPage(params.mdxPath);
9+
return metadata;
10+
}
11+
12+
export default async function Page(props: { params: Promise<{ mdxPath?: string[] }> }) {
13+
const params = await props.params;
14+
const result = await importPage(params.mdxPath);
15+
const { default: MDXContent, ...rest } = result;
16+
const { wrapper: Wrapper } = useMDXComponents();
17+
18+
return (
19+
<Wrapper {...rest}>
20+
<MDXContent />
21+
</Wrapper>
22+
);
23+
}

docs/app/layout.tsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { Banner, Head } from 'nextra/components';
2+
import { getPageMap } from 'nextra/page-map';
3+
import { Footer, Layout, Navbar } from 'nextra-theme-docs';
4+
import 'nextra-theme-docs/style.css';
5+
6+
export const metadata = {
7+
title: 'eventkit - Event Ingestion and Processing Kit for Python',
8+
description:
9+
'A production-ready kit for building event collection pipelines with flexible ingestion, stream-based routing, and pluggable storage',
10+
};
11+
12+
const banner = (
13+
<Banner storageKey="eventkit-banner" dismissible>
14+
eventkit is in active development. APIs may change.
15+
</Banner>
16+
);
17+
18+
const navbar = (
19+
<Navbar
20+
logo={<strong>eventkit</strong>}
21+
projectLink="https://github.com/prosdevlab/eventkit"
22+
chatLink="https://github.com/prosdevlab/eventkit/discussions"
23+
/>
24+
);
25+
26+
const footer = (
27+
<Footer>
28+
MIT {new Date().getFullYear()} ©{' '}
29+
<a href="https://github.com/prosdevlab" target="_blank" rel="noreferrer">
30+
ProsDevLab
31+
</a>
32+
.
33+
</Footer>
34+
);
35+
36+
export default async function RootLayout({ children }: { children: React.ReactNode }) {
37+
return (
38+
<html lang="en" dir="ltr" suppressHydrationWarning>
39+
<Head>
40+
<link rel="icon" href="/favicon.ico" />
41+
</Head>
42+
<body>
43+
<Layout
44+
banner={banner}
45+
navbar={navbar}
46+
pageMap={await getPageMap()}
47+
docsRepositoryBase="https://github.com/prosdevlab/eventkit/tree/main/docs/content"
48+
footer={footer}
49+
>
50+
{children}
51+
</Layout>
52+
</body>
53+
</html>
54+
);
55+
}

0 commit comments

Comments
 (0)