Revert "chore(web): test"

This reverts commit 16e22726c8.
This commit is contained in:
Aman Varshney
2025-08-12 18:17:18 +05:30
parent 16e22726c8
commit 13e7d3a9ee
4 changed files with 7 additions and 19 deletions

View File

@@ -3,7 +3,6 @@ import { source } from "@/lib/source";
// cached forever
export const revalidate = false;
export const dynamic = 'force-static';
export async function GET() {
const scan = source.getPages().map(getLLMText);

View File

@@ -1,10 +1,10 @@
import { notFound } from "next/navigation";
import { type NextRequest, NextResponse } from "next/server";
import { getLLMText } from "@/lib/get-llm-text";
import { source } from "@/lib/source";
import { notFound } from "next/navigation";
export const revalidate = false;
export const dynamic = "force-static";
export async function GET(
_req: NextRequest,
{ params }: { params: Promise<{ slug?: string[] }> },

View File

@@ -1,20 +1,9 @@
import type { InferPageType } from "fumadocs-core/source";
import { remarkInclude } from "fumadocs-mdx/config";
import { remark } from "remark";
import remarkGfm from "remark-gfm";
import remarkMdx from "remark-mdx";
import { remarkInclude } from "fumadocs-mdx/config";
// Avoid importing `source` at runtime to keep bundle small
// import { source } from '@/lib/source';
// import type { InferPageType } from 'fumadocs-core/source';
type LLMPage = {
url: string;
data: {
title: string;
description?: string;
content: string;
_file: { absolutePath: string; path: string };
};
};
import type { source } from "@/lib/source";
const processor = remark()
.use(remarkMdx)
@@ -22,7 +11,7 @@ const processor = remark()
.use(remarkInclude)
.use(remarkGfm);
export async function getLLMText(page: LLMPage) {
export async function getLLMText(page: InferPageType<typeof source>) {
const processed = await processor.process({
path: page.data._file.absolutePath,
value: page.data.content,

View File

@@ -4,8 +4,8 @@
"name": "better-t-stack",
"compatibility_date": "2025-07-13",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"minify": true,
"keep_names": false,
"minify": true,
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS"