-
Notifications
You must be signed in to change notification settings - Fork 9
Migrate docs from Mintlify to fumadocs #457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
masnwilliams
wants to merge
26
commits into
main
Choose a base branch
from
hypeship/fumadocs-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6ed79ee
Migrate docs from Mintlify to fumadocs (Next.js, self-hosted)
masnwilliams 9f94fda
Pin Vercel framework preset to Next.js
masnwilliams 4d67246
Default docs assistant to Haiku
masnwilliams 2a8ff17
Address Bugbot review findings
masnwilliams a5659c1
Match production docs look: notebook layout, logo wordmark
masnwilliams 2219ac8
Sidebar links: text-only hover/active states like navbar links
masnwilliams 9ba98c9
Sidebar folder toggles: same text-only hover as page links
masnwilliams a1c1731
Pointer cursor on sidebar folder toggles
masnwilliams d21485a
Match Mintlify homepage and page chrome; disable overscroll
masnwilliams 3b528d5
Group API reference endpoints by tag, like prod
masnwilliams d0371d9
Render title and description on API reference pages
masnwilliams 3422937
Render API responses with a status-code dropdown
masnwilliams 175b328
Fix AI chat: pass system prompt via instructions option
masnwilliams f97c250
API sidebar method badges + plain status dropdown
masnwilliams 3a16eee
Drop role labels in AI chat; user turn as a bubble
masnwilliams 87fa555
Address bugbot findings: code tabs, input casing, open-in URL
masnwilliams 72441ee
Harden /api/chat: BotID + rate limiting
masnwilliams b51b764
BotID Deep Analysis + Vercel Firewall rate limiting
masnwilliams 95c5171
Add Braintrust chat telemetry + input-size guard
masnwilliams 79ea2cc
Group chat turns into one Braintrust trace per conversation
masnwilliams b9da61d
Tag chat retries in Braintrust
masnwilliams 240ffc7
Enable fumadocs ImageZoom for content images
masnwilliams 0ddfd42
Raise chat input-size cap so real conversations aren't rejected
masnwilliams e74151f
Soften API method badges to subtle tints
masnwilliams 23385a9
Fix bugbot findings across the docs app
masnwilliams 3fe509e
Merge origin/main into hypeship/fumadocs-migration
masnwilliams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,27 @@ | ||
| */.DS_Store | ||
| # deps | ||
| /node_modules | ||
|
|
||
| # generated content | ||
| .source | ||
|
|
||
| # test & build | ||
| /coverage | ||
| /.next/ | ||
| /out/ | ||
| /build | ||
| *.tsbuildinfo | ||
|
|
||
| # misc | ||
| .DS_Store | ||
| .env | ||
| *.pem | ||
| /.pnp | ||
| .pnp.js | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| node_modules/ | ||
| venv | ||
| __pycache__/** | ||
| test.py | ||
| ./kernel/** | ||
| # others | ||
| .env | ||
| .env*.local | ||
| .vercel | ||
| next-env.d.ts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| import { | ||
| DocsBody, | ||
| DocsDescription, | ||
| DocsPage, | ||
| DocsTitle, | ||
| MarkdownCopyButton, | ||
| } from "fumadocs-ui/layouts/notebook/page"; | ||
| import { createRelativeLink } from "fumadocs-ui/mdx"; | ||
| import type { Metadata } from "next"; | ||
| import { notFound, redirect } from "next/navigation"; | ||
| import { getMDXComponents } from "@/components/mdx"; | ||
| import { OpenInDropdown } from "@/components/page-actions"; | ||
| import { SocialFooter } from "@/components/social-footer"; | ||
| import { getPageImage, getPageMarkdownUrl, source } from "@/lib/source"; | ||
| import { getEyebrow } from "@/lib/tree"; | ||
|
|
||
| export default async function Page(props: PageProps<"/[[...slug]]">) { | ||
| const params = await props.params; | ||
| const page = source.getPage(params.slug); | ||
| if (!page) notFound(); | ||
| // Mintlify url: frontmatter marks a page as an external sidebar link | ||
| if (page.data.url) redirect(page.data.url); | ||
|
|
||
| const MDX = page.data.body; | ||
| const markdownUrl = getPageMarkdownUrl(page).url; | ||
| const eyebrow = getEyebrow(params.slug ?? []); | ||
| // Mintlify's mode: wide widens the content column and drops the TOC | ||
| const full = page.data.full || page.data.mode === "wide"; | ||
|
|
||
| return ( | ||
| <DocsPage | ||
| toc={page.data.toc} | ||
| full={full} | ||
| breadcrumb={{ enabled: false }} | ||
| footer={{ children: <SocialFooter /> }} | ||
| > | ||
| {eyebrow ? ( | ||
| <span className="-mb-4 text-sm font-semibold text-fd-primary"> | ||
| {eyebrow} | ||
| </span> | ||
| ) : null} | ||
| <DocsTitle className="text-3xl tracking-tight sm:text-4xl"> | ||
| {page.data.title} | ||
| </DocsTitle> | ||
| <DocsDescription className="mb-0"> | ||
| {page.data.description} | ||
| </DocsDescription> | ||
| <div className="flex flex-row gap-2 items-center border-b pb-6"> | ||
| <MarkdownCopyButton markdownUrl={markdownUrl}> | ||
| Copy page | ||
| </MarkdownCopyButton> | ||
| <OpenInDropdown /> | ||
| </div> | ||
| <DocsBody> | ||
| <MDX | ||
| components={getMDXComponents({ | ||
| // this allows you to link to other pages with relative file paths | ||
| a: createRelativeLink(source, page), | ||
| })} | ||
| /> | ||
| </DocsBody> | ||
| </DocsPage> | ||
| ); | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| } | ||
|
|
||
| export async function generateStaticParams() { | ||
| return source.generateParams(); | ||
| } | ||
|
|
||
| export async function generateMetadata( | ||
| props: PageProps<"/[[...slug]]">, | ||
| ): Promise<Metadata> { | ||
| const params = await props.params; | ||
| const page = source.getPage(params.slug); | ||
| if (!page) notFound(); | ||
|
|
||
| return { | ||
| title: page.data.title, | ||
| description: page.data.description, | ||
| openGraph: { | ||
| images: getPageImage(page).url, | ||
| }, | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import { | ||
| DocsBody, | ||
| DocsDescription, | ||
| DocsPage, | ||
| DocsTitle, | ||
| } from "fumadocs-ui/layouts/notebook/page"; | ||
| import type { Metadata } from "next"; | ||
| import { notFound } from "next/navigation"; | ||
| import { OpenAPIPage } from "@/components/api-page"; | ||
| import { SocialFooter } from "@/components/social-footer"; | ||
| import { apiSource } from "@/lib/source"; | ||
|
|
||
| export default async function Page( | ||
| props: PageProps<"/api-reference/[[...slug]]">, | ||
| ) { | ||
| const params = await props.params; | ||
| const page = apiSource.getPage(params.slug); | ||
| if (!page) notFound(); | ||
|
|
||
| return ( | ||
| <DocsPage toc={page.data.toc} footer={{ children: <SocialFooter /> }}> | ||
| <DocsTitle className="text-3xl tracking-tight sm:text-4xl"> | ||
| {page.data.title} | ||
| </DocsTitle> | ||
| {page.data.description ? ( | ||
| <DocsDescription className="mb-0"> | ||
| {page.data.description} | ||
| </DocsDescription> | ||
| ) : null} | ||
| <DocsBody> | ||
| <OpenAPIPage {...page.data.getOpenAPIPageProps()} /> | ||
| </DocsBody> | ||
| </DocsPage> | ||
| ); | ||
| } | ||
|
|
||
| export function generateStaticParams() { | ||
| return apiSource.generateParams(); | ||
| } | ||
|
|
||
| export async function generateMetadata( | ||
| props: PageProps<"/api-reference/[[...slug]]">, | ||
| ): Promise<Metadata> { | ||
| const params = await props.params; | ||
| const page = apiSource.getPage(params.slug); | ||
| if (!page) notFound(); | ||
|
|
||
| return { title: page.data.title, description: page.data.description }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { buttonVariants } from "fumadocs-ui/components/ui/button"; | ||
| import { DocsLayout } from "fumadocs-ui/layouts/notebook"; | ||
| import { MessageCircleIcon } from "lucide-react"; | ||
| import { | ||
| AISearch, | ||
| AISearchPanel, | ||
| AISearchTrigger, | ||
| } from "@/components/ai/search"; | ||
| import { cn } from "@/lib/cn"; | ||
| import { baseOptions } from "@/lib/layout.shared"; | ||
| import { buildTree } from "@/lib/tree"; | ||
|
|
||
| export default function Layout({ children }: LayoutProps<"/">) { | ||
| return ( | ||
| <DocsLayout tree={buildTree()} tabMode="navbar" {...baseOptions()}> | ||
| <AISearch> | ||
| <AISearchPanel /> | ||
| <AISearchTrigger | ||
| position="float" | ||
| className={cn( | ||
| buttonVariants({ | ||
| variant: "secondary", | ||
| className: "text-fd-muted-foreground rounded-2xl", | ||
| }), | ||
| )} | ||
| > | ||
| <MessageCircleIcon className="size-4.5" /> | ||
| Ask AI | ||
| </AISearchTrigger> | ||
| </AISearch> | ||
|
|
||
| {children} | ||
| </DocsLayout> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.