Skip to content

openintentsframework/oif-docs

Repository files navigation

oif-docs

This is a Next.js application generated with Create Fumadocs.

Run development server:

npm run dev
# or
pnpm dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Explore

In the project, you can see:

  • lib/source.ts: Code for content source adapter, loader() provides the interface to access your content.
  • lib/layout.shared.tsx: Shared options for layouts, optional but preferred to keep.
Route Description
app/(home) The route group for your landing page and other pages.
app/docs The documentation layout and pages.
app/api/search/route.ts The Route Handler for search.

Fumadocs MDX

A source.config.ts config file has been included, you can customise different options like frontmatter schema.

Read the Introduction for further details.

Learn More

To learn more about Next.js and Fumadocs, take a look at the following resources:

OpenAPI docs

This project integrates the official OpenAPI UI for Fumadocs.

  • Styles are enabled via src/app/global.css importing fumadocs-openapi/css/preset.css.
  • The OpenAPI instance is configured in src/lib/openapi.ts.
  • The OpenAPI transformer is added in src/lib/source.ts.
  • The MDX component APIPage is registered in src/mdx-components.tsx.
  • A demo page is at content/docs/integration/openapi.mdx.

Add or update APIs

  1. Place your schema files in the openapi/ directory. Supported formats: .json, .yaml, .yml.
  2. No additional config is required. All files in openapi/ are automatically loaded by src/lib/openapi.ts.
  3. Create or edit an MDX page and render the UI:
---
title: My API
description: Reference and playground
---

<APIPage />
  1. Optionally, add a link to your page in a section index (e.g. content/docs/integration/index.mdx).

For details, see the upstream docs: OpenAPI UI docs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

Languages