@yaakdoc/next
v0.6.0
Published
Serve yaakdoc API documentation from a Next.js app, e.g. at /docs.
Maintainers
Readme
@yaakdoc/next
Serve yaakdoc API documentation from a Next.js app, e.g. at /docs.
npm i @yaakdoc/next// next.config.ts
import type { NextConfig } from "next";
import { createNextYaakdoc } from "@yaakdoc/next";
const withYaakdoc = createNextYaakdoc({
path: "/docs",
export: "./yaak.json",
config: {
branding: {
title: "Acme API",
},
},
});
const nextConfig: NextConfig = {};
export default withYaakdoc(nextConfig);next dev proxies the docs to a yaakdoc dev server, and next build prerenders them into public/docs (add that folder to .gitignore).
It includes the yaakdoc CLI of the same version, so there's no need to install yaakdoc too.
See the Next.js integration docs for all options, using it with other plugins and a checklist for existing apps.
