Skip to content

feat: add docs - #9

Merged
chonk-lain merged 2 commits into
mainfrom
dev
Aug 20, 2026
Merged

feat: add docs#9
chonk-lain merged 2 commits into
mainfrom
dev

Conversation

@chonk-lain

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 20, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new docs/ Next.js + Fumadocs documentation site for nobg, along with initial MDX content for guides and API reference, and updates contributor documentation to point at the new docs workflow.

Changes:

  • Introduces a standalone docs/ Next.js app (configs, routes, MDX component wiring).
  • Adds initial documentation content (Quickstart, Guides, Reference pages, navigation meta).
  • Expands CONTRIBUTING.md with clearer setup, testing, and docs-site instructions.

Reviewed changes

Copilot reviewed 44 out of 45 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/tsconfig.json Adds TypeScript configuration for the docs app.
docs/README.md Adds local development and content-authoring instructions for the docs site.
docs/proxy.ts Adds request negotiation/rewrite logic intended for markdown representations.
docs/postcss.config.mjs Adds PostCSS config for Tailwind integration.
docs/package.json Defines docs-site dependencies and scripts.
docs/next.config.mjs Configures Next.js with Fumadocs MDX integration.
docs/content/docs/reference/sam3.mdx Adds API reference page for Sam3.
docs/content/docs/reference/processors.mdx Adds API reference page for processors and shared post-processing helpers.
docs/content/docs/reference/onnx.mdx Adds API reference page for ONNX mixin + wrapper behavior.
docs/content/docs/reference/metrics.mdx Adds API reference page for evaluation metrics.
docs/content/docs/reference/meta.json Adds sidebar ordering for reference section.
docs/content/docs/reference/losses.mdx Adds API reference page for losses.
docs/content/docs/reference/birefnet.mdx Adds API reference page for BiRefNet.
docs/content/docs/reference/auto.mdx Adds API reference page for AutoModel / AutoProcessor.
docs/content/docs/quickstart.mdx Adds a quickstart guide page.
docs/content/docs/models.mdx Adds “model zoo” page describing available checkpoints.
docs/content/docs/meta.json Adds top-level docs navigation meta.
docs/content/docs/installation.mdx Adds installation guidance (package + torch + extras).
docs/content/docs/index.mdx Adds docs landing/introduction page.
docs/content/docs/guides/text-prompts.mdx Adds guide for SAM3 text/box prompting.
docs/content/docs/guides/refining-edges.mdx Adds guide for foreground refinement.
docs/content/docs/guides/onnx.mdx Adds guide for ONNX export/load usage.
docs/content/docs/guides/meta.json Adds sidebar ordering for guides section.
docs/content/docs/guides/hub.mdx Adds guide for Hub save/push/load and re-parameterization.
docs/content/docs/guides/gpu-and-precision.mdx Adds guide for device placement and precision behavior.
docs/content/docs/guides/fine-tuning.mdx Adds guide for fine-tuning via HF Trainer.
docs/content/docs/guides/evaluation.mdx Adds guide for evaluation usage + conventions.
docs/content/docs/guides/batched-inference.mdx Adds guide for batching patterns (incl. video framing notes).
docs/content/docs/guides/background-removal.mdx Adds guide for process/predict/raw pipeline usage.
docs/content/docs/contributing.mdx Adds a docs-site “Contributing” page mirroring repo contribution rules.
docs/components/mdx.tsx Registers global MDX components (Tabs, Steps, TypeTable, Accordions, etc.).
docs/app/og/docs/[...slug]/route.tsx Adds dynamic Open Graph image generation for docs pages.
docs/app/llms.txt/route.ts Adds LLM index endpoint for docs content.
docs/app/llms.mdx/docs/[[...slug]]/route.ts Adds markdown endpoint for LLM consumption per-page.
docs/app/llms-full.txt/route.ts Adds “all pages concatenated” endpoint for LLM consumption.
docs/app/layout.tsx Adds root layout, global styles, and site metadata configuration.
docs/app/global.css Adds Tailwind + Fumadocs UI CSS imports and a small global style tweak.
docs/app/docs/layout.tsx Adds docs layout wrapper using Fumadocs page tree.
docs/app/docs/[[...slug]]/page.tsx Adds catch-all docs page rendering with TOC + view/copy controls.
docs/app/api/search/route.ts Adds server search endpoint wired to the docs content source.
docs/app/(home)/page.tsx Adds docs-site home/landing page content.
docs/app/(home)/layout.tsx Adds home layout wrapper for the landing page.
docs/.gitignore Adds docs-app specific ignores for generated/build artifacts.
CONTRIBUTING.md Expands contributor guidance and documents the docs-site workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/README.md
Comment on lines +15 to +20
| Script | What it does |
| ---------------------- | --------------------------------------- |
| `npm run dev` | Dev server with hot reload |
| `npm run build` | Production build |
| `npm run start` | Serve the production build |
| `npm run types:check` | `next typegen` + `tsc --noEmit` |
Comment thread docs/tsconfig.json
Comment on lines +16 to +19
"incremental": true,
"paths": {
"@/*": ["./*"]
},
Comment thread docs/README.md
Comment on lines +54 to +64
| Path | What it holds |
| ------------------------- | ---------------------------------------------------------------- |
| `content/docs/` | Every documentation page, as MDX |
| `lib/shared.ts` | Site name, description, repo coordinates, external links |
| `lib/layout.shared.tsx` | Nav title, logo and top-level nav links |
| `lib/source.ts` | Content source adapter and page-URL helpers |
| `app/(home)/page.tsx` | Landing page |
| `app/docs/` | Docs layout and the catch-all page route |
| `app/api/search/route.ts` | Search endpoint (Orama, built at request time from the content) |
| `app/og/` | Generated Open Graph images |

Comment thread docs/app/layout.tsx
Comment on lines +1 to +6
import { RootProvider } from 'fumadocs-ui/provider/next';
import './global.css';
import { Inter } from 'next/font/google';
import type { Metadata } from 'next';
import { appDescription, appName, baseUrl } from '@/lib/shared';

Comment thread docs/app/docs/layout.tsx
Comment on lines +1 to +3
import { source } from '@/lib/source';
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { baseOptions } from '@/lib/layout.shared';
Comment thread docs/proxy.ts
Comment on lines +14 to +31
export default function proxy(request: NextRequest) {
const result = rewriteSuffix(request.nextUrl.pathname);
if (result) {
return NextResponse.rewrite(new URL(result, request.nextUrl));
}

if (isMarkdownPreferred(request)) {
const result = rewriteDocs(request.nextUrl.pathname);

if (result) {
return NextResponse.rewrite(new URL(result, request.nextUrl), {
// this URL has two representations, selected by `Accept`
headers: { Vary: 'Accept' },
});
}
}

return NextResponse.next();
@chonk-lain
chonk-lain merged commit 81b7079 into main Aug 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants