mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
fix(web): remove LLM page actions and related routes
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
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 type { source } from "@/lib/source";
|
||||
|
||||
const processor = remark()
|
||||
.use(remarkMdx)
|
||||
// needed for Fumadocs MDX
|
||||
.use(remarkInclude)
|
||||
.use(remarkGfm);
|
||||
|
||||
export async function getLLMText(page: InferPageType<typeof source>) {
|
||||
const processed = await processor.process({
|
||||
path: page.data._file.absolutePath,
|
||||
value: page.data.content,
|
||||
});
|
||||
|
||||
return `# ${page.data.title}
|
||||
URL: ${page.url}
|
||||
|
||||
${page.data.description}
|
||||
|
||||
${processed.value}`;
|
||||
}
|
||||
Reference in New Issue
Block a user