Skip to content

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onedocs

Zero-config documentation for Next.js + Fumadocs

npm version CI license


Install one dependency, write markdown, ship docs.

Note: Onedocs is designed for standalone documentation websites, not for integrating docs into existing applications.

Features

  • One Dependency - Bundles Next.js patterns, Fumadocs UI, and MDX handling
  • Zero Config - Works out of the box with sensible defaults
  • Markdown First - Write .md or .mdx files, get beautiful docs
  • Full-text Search - Built-in Orama search indexes your content automatically
  • Dark Mode - Beautiful light and dark themes with system preference support
  • Inter Font - Bundled Inter variable font with OpenType features
  • TypeScript Ready - Full type-safe configuration

Quick Start

bun add onedocs

Create onedocs.config.tsx:

import { defineConfig } from "onedocs/config";

export default defineConfig({
  title: "My Project",
  description: "Documentation for My Project",
  nav: {
    github: "username/repo",
  },
});

Import the CSS preset in src/app/globals.css:

@import "onedocs/css/preset.css";

Create your homepage in src/app/page.tsx:

import { HomePage } from "onedocs";
import config from "../../onedocs.config";

export default function Home() {
  return <HomePage config={config} packageName="my-package" />;
}

Add your markdown files in content/docs/ and run:

bun run dev

Configuration

import { defineConfig } from "onedocs/config";
import { Package, Zap } from "lucide-react";

export default defineConfig({
  title: "My Project",
  description: "Project description",
  logo: {
    light: "/logo-light.svg",
    dark: "/logo-dark.svg",
  },
  icon: "/icon.png",
  nav: {
    github: "username/repo",
    links: [{ label: "Blog", href: "/blog" }],
  },
  homepage: {
    hero: {
      title: "Ship docs in minutes",
      description: "Your tagline here",
      cta: { label: "Get Started", href: "/docs" },
    },
    features: [
      {
        title: "Feature One",
        description: "Description here",
        icon: <Package className="h-5 w-5 text-fd-primary" />,
      },
      {
        title: "Feature Two",
        description: "Description here",
        icon: <Zap className="h-5 w-5 text-fd-primary" />,
      },
    ],
  },
});

Exports

Main (onedocs)

export { RootLayout, DocsLayout, HomePage, HomeLayout } from "onedocs";
export { InstallBlock, Logo, CTASection, GitHubIcon } from "onedocs";
export { defineConfig } from "onedocs";

Components (onedocs/components)

import { Callout, Card, Tabs, Tab, Steps, Step } from "onedocs/components";

CSS (onedocs/css/preset.css)

Includes Tailwind, Fumadocs styles, Inter font, and OpenType features.

Documentation

For full documentation, visit onedocs.dev.

Development

bun install
bun run build
bun run --cwd packages/onedocs test

The portable Markdown documentation lives in docs/ at the repository root. Validate it with:

node scripts/check-docs-content.mjs --expected-docs 6 --expected-nav 1

License

MIT

About

Zero-config documentation wrapper for TanStack Start + Fumadocs.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Contributors

Languages