github fuma-nama/fumadocs fumadocs-epub@1.2.1

latest releases: fumadocs-preview@0.2.2, cli@16.2.0...
4 hours ago

createEpubExportAPI()

A route handler for the EPUB export, replacing the auth check and response headers you had to write yourself:

// app/export/epub/route.ts
import { createEpubExportAPI } from 'fumadocs-epub';
import { source } from '@/lib/source';

export const { GET } = createEpubExportAPI({
  source,
  title: 'Documentation',
  author: 'Your Team',
  secret: process.env.EXPORT_SECRET,
});

secret is required: requests must send Authorization: Bearer <secret>, and the route answers 503 while the secret itself is unset, so a missing environment variable cannot leave the export open. It also takes filename (default docs.epub) and every option of exportEpub(), which stays available for public routes and scripts.

Don't miss a new fumadocs release

NewReleases is sending notifications on new releases.