@heyo-sh/heyo-docs
v3.4.1
Published
A themeable documentation runtime for React Router Framework Mode.
Readme
Heyo Docs
The themeable documentation runtime behind Heyo Docs sites. It provides MDX content, navigation, search, OpenAPI reference pages, and SEO utilities for React Router, Next.js, and Astro.
Get started
For a new documentation site, use the project creator:
# pnpm
pnpm create @heyo-sh/heyo-docs
# npm
npm create @heyo-sh/heyo-docs@latest
# Yarn
yarn dlx @heyo-sh/create-heyo-docs
# Bun
bun create @heyo-sh/heyo-docsTo add the runtime to an existing supported application:
# pnpm
pnpm add @heyo-sh/heyo-docs
# npm
npm install @heyo-sh/heyo-docs
# Yarn
yarn add @heyo-sh/heyo-docs
# Bun
bun add @heyo-sh/heyo-docsFramework integrations and the configuration reference are available in the Heyo Docs documentation.
Import surfaces
The root export is deliberately limited to the DocsApp React component. Import
runtime capabilities from their domain entrypoints:
@heyo-sh/heyo-docs/config— configuration validation@heyo-sh/heyo-docs/modeland/navigation— documentation model and routes@heyo-sh/heyo-docs/seo— framework-neutral metadata, JSON-LD, breadcrumbs and sitemaps;/seo/nextand/seo/react-routerprovide framework adapters@heyo-sh/heyo-docs/openapiand/openapi/request— OpenAPI model and edge-safe request handler@heyo-sh/heyo-docs/next,/next/plugins,/astro,/vite,/node— build and framework adapters@heyo-sh/heyo-docs/theme/provider,/theme/script,/llm,/rss,/search,/mdx,/link,/types
Minimum configuration
import { heyoDocs } from "@heyo-sh/heyo-docs/config";
export default heyoDocs({
content: "content",
navigation: [
{ label: "Status", href: "https://status.example.com" },
{ label: "Sign in", href: "https://app.example.com", variant: "primary" },
],
groups: [
{
group: "Documentation",
sections: [{ pages: ["index"] }],
},
],
});Header navigation renders every item as a Button. variant accepts the same values as Button and defaults to link.
Markdown and AI actions
Documentation, changelog, and OpenAPI pages expose Copy for LLM and
Open by default. Both actions use the current page's public .md URL and
preserve a mount path such as /docs automatically. They are independent of
AI Chat and provider credentials.
export default heyoDocs({
siteUrl: "https://docs.acme.com/docs",
ai: {
copyForLLM: "enabled", // default
openIn: "disabled",
},
});The host must serve public *.md endpoints. Every project generated by
create-heyo-docs includes them. Read the configuration reference for the full API.
Contributing
Contributions are welcome. Read the contribution guide before opening a pull request.
