-
Notifications
You must be signed in to change notification settings - Fork 1
Update /apps/docs to latest fumadocs template #576
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| import { source } from '@/app/source'; | ||
| import { createSearchAPI } from 'fumadocs-core/search/server'; | ||
| import { source } from '@/lib/source'; | ||
| import { createFromSource } from 'fumadocs-core/search/server'; | ||
|
|
||
| export const { GET } = createSearchAPI('simple', { | ||
| indexes: source.getPages().map((page) => ({ | ||
| title: page.data.title ?? 'Untitled', | ||
| content: page.data.description ?? '', | ||
| url: page.url, | ||
| })), | ||
| export const { GET } = createFromSource(source, { | ||
| language: 'english', | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,3 @@ | ||
| @import "tailwindcss"; | ||
| @import "fumadocs-ui/style.css"; | ||
|
|
||
| @layer base { | ||
| :root { | ||
| --radius: 0.5rem; | ||
| } | ||
| } | ||
|
|
||
| @layer utilities { | ||
| .text-balance { | ||
| text-wrap: balance; | ||
| } | ||
| } | ||
| @import 'tailwindcss'; | ||
| @import 'fumadocs-ui/css/neutral.css'; | ||
| @import 'fumadocs-ui/css/preset.css'; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { getLLMText, source } from '@/lib/source'; | ||
|
|
||
| export const revalidate = false; | ||
|
|
||
| export async function GET() { | ||
| const scan = source.getPages().map(getLLMText); | ||
| const scanned = await Promise.all(scan); | ||
|
|
||
| return new Response(scanned.join('\n\n')); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||||||||||
| import { getLLMText, source } from '@/lib/source'; | ||||||||||||||
| import { notFound } from 'next/navigation'; | ||||||||||||||
|
|
||||||||||||||
| export const revalidate = false; | ||||||||||||||
|
|
||||||||||||||
| export async function GET( | ||||||||||||||
| _req: Request, | ||||||||||||||
| { params }: { params: Promise<{ slug?: string[] }> }, | ||||||||||||||
| ) { | ||||||||||||||
| const { slug } = await params; | ||||||||||||||
|
Comment on lines
+8
to
+10
|
||||||||||||||
| { params }: { params: Promise<{ slug?: string[] }> }, | |
| ) { | |
| const { slug } = await params; | |
| { params }: { params: { slug?: string[] } }, | |
| ) { | |
| const { slug } = params; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { source } from '@/lib/source'; | ||
|
|
||
| export const revalidate = false; | ||
|
|
||
| export async function GET() { | ||
| const lines: string[] = []; | ||
| lines.push('# Documentation'); | ||
| lines.push(''); | ||
| for (const page of source.getPages()) { | ||
| lines.push(`- [${page.data.title}](${page.url}): ${page.data.description}`); | ||
| } | ||
| return new Response(lines.join('\n')); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||
| import { getPageImage, source } from '@/lib/source'; | ||||||||||||||
| import { notFound } from 'next/navigation'; | ||||||||||||||
| import { ImageResponse } from 'next/og'; | ||||||||||||||
| import { generate as DefaultImage } from 'fumadocs-ui/og'; | ||||||||||||||
|
|
||||||||||||||
| export const revalidate = false; | ||||||||||||||
|
|
||||||||||||||
| export async function GET( | ||||||||||||||
| _req: Request, | ||||||||||||||
| { params }: { params: Promise<{ slug: string[] }> }, | ||||||||||||||
| ) { | ||||||||||||||
| const { slug } = await params; | ||||||||||||||
|
Comment on lines
+10
to
+12
|
||||||||||||||
| { params }: { params: Promise<{ slug: string[] }> }, | |
| ) { | |
| const { slug } = await params; | |
| { params }: { params: { slug: string[] } }, | |
| ) { | |
| const { slug } = params; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This endpoint returns plain text/markdown but does not set a
Content-Type. Add an explicit response header (e.g.text/plain; charset=utf-8ortext/markdown; charset=utf-8) to avoid ambiguous content sniffing by clients.