@farming-labs/docs

Sidebar

The sidebar is auto-generated from your file structure. Customize its appearance through config.

Custom Title

The sidebar title supports strings or React components:

docs.config.tsx
nav: {
  title: (
    <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
      <Rocket size={14} />
      <span>My Docs</span>
    </div>
  ),
  url: "/docs",
},

Icons

Add icons to sidebar items via frontmatter:

page.mdx
---
title: "Getting Started"
icon: "rocket"
---

Register icons in your config:

docs.config.tsx
icons: {
  rocket: <Rocket size={16} />,
  book: <BookOpen size={16} />,
},

Collapsible Groups

Nested directories automatically become collapsible groups. A directory with its own page.mdx becomes a folder with an index page:

app/docs/
  plugins/
    page.mdx            # Folder index (clickable)
    organizations/
      page.mdx           # Child page
    two-factor/
      page.mdx           # Child page
theme: pixelBorder({
  ui: {
    sidebar: { style: "floating" },
  },
}),

Enable breadcrumb navigation:

docs.config.tsx
breadcrumb: { enabled: true },

Shows Parent / Current Page with the parent being clickable.

On this page

No Headings