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
65 changes: 65 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Deploy Docs

on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

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

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

- name: Build docs
working-directory: ./docs
env:
BASE_PATH: /sdk-kit
NODE_ENV: production
run: |
pnpm install --frozen-lockfile
pnpm build

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

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

deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ if (!PLUGIN_EXCLUDED_STORAGE) {

## Documentation

### [Plugin Development Guide](./docs/plugin-development-guide.md)
### [Plugin Development Guide](./packages/plugins/GUIDE.md)

Comprehensive guide for building SDK Kit plugins, covering:

Expand Down Expand Up @@ -327,7 +327,7 @@ We welcome contributions! Here's how to get involved:

- **[Development Workflow](./WORKFLOW.md)** - How we plan, track, and implement features
- **[Contributing Guide](./CONTRIBUTING.md)** - Code style, PR process, and guidelines
- **[Plugin Development Guide](./docs/plugin-development-guide.md)** - Building plugins for SDK Kit
- **[Plugin Development Guide](./packages/plugins/GUIDE.md)** - Building plugins for SDK Kit
- **[Code of Conduct](./CODE_OF_CONDUCT.md)** - Community guidelines and standards

Our workflow follows a spec-driven approach where detailed specifications live in the `specs/` directory, and GitHub issues are used for tracking progress.
Expand Down
36 changes: 36 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Testing
coverage/

# Next.js
.next/
out/
dist/

# Production
build/

# Misc
.DS_Store
*.pem

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Local env files
.env*.local
.env

# Vercel
.vercel

# TypeScript
*.tsbuildinfo
next-env.d.ts

25 changes: 25 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SDK Kit Documentation

This directory contains the Nextra-based documentation site for SDK Kit.

## Development

```bash
pnpm install
pnpm dev
```

Visit [http://localhost:3000](http://localhost:3000) to see the documentation.

## Build

```bash
pnpm build
```

The static site will be generated in the `out/` directory.

## Deployment

The site is automatically deployed to GitHub Pages via GitHub Actions when changes are pushed to the main branch.

23 changes: 23 additions & 0 deletions docs/app/[[...mdxPath]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { generateStaticParamsFor, importPage } from 'nextra/pages';
import { useMDXComponents } from 'nextra-theme-docs';

export const generateStaticParams = generateStaticParamsFor('mdxPath');

export async function generateMetadata(props: { params: Promise<{ mdxPath?: string[] }> }) {
const params = await props.params;
const { metadata } = await importPage(params.mdxPath);
return metadata;
}

export default async function Page(props: { params: Promise<{ mdxPath?: string[] }> }) {
const params = await props.params;
const result = await importPage(params.mdxPath);
const { default: MDXContent, ...rest } = result;
const { wrapper: Wrapper } = useMDXComponents();

return (
<Wrapper {...rest}>
<MDXContent />
</Wrapper>
);
}
55 changes: 55 additions & 0 deletions docs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { Banner, Head } from 'nextra/components';
import { getPageMap } from 'nextra/page-map';
import { Footer, Layout, Navbar } from 'nextra-theme-docs';
import 'nextra-theme-docs/style.css';

export const metadata = {
title: 'SDK Kit - Modern TypeScript Framework for Building JavaScript SDKs',
description:
'A lightweight, extensible TypeScript framework for building JavaScript SDKs with a powerful plugin architecture',
};

const banner = (
<Banner storageKey="sdk-kit-banner" dismissible>
SDK Kit is in active development. APIs may change.
</Banner>
);

const navbar = (
<Navbar
logo={<strong>SDK Kit</strong>}
projectLink="https://github.com/lytics/sdk-kit"
chatLink="https://github.com/lytics/sdk-kit/discussions"
/>
);

const footer = (
<Footer>
MIT {new Date().getFullYear()} ©{' '}
<a href="https://github.com/lytics" target="_blank" rel="noreferrer">
Lytics
</a>
.
</Footer>
);

export default async function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" dir="ltr" suppressHydrationWarning>
<Head>
<link rel="icon" href="/favicon.ico" />
</Head>
<body>
<Layout
banner={banner}
navbar={navbar}
pageMap={await getPageMap()}
docsRepositoryBase="https://github.com/lytics/sdk-kit/tree/main/docs/content"
footer={footer}
>
{children}
</Layout>
</body>
</html>
);
}
7 changes: 7 additions & 0 deletions docs/content/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"index": "Introduction",
"getting-started": "Getting Started",
"core-concepts": "Core Concepts",
"plugin-guide": "Plugin Guide"
}

Loading