mirror of
https://github.com/dathere/ckan-devstaller.git
synced 2025-11-09 13:39:49 +00:00
feat: add /docs deployed at https://ckan-devstaller.dathere.com
This commit is contained in:
parent
16088fc929
commit
64708d2d68
26 changed files with 1376 additions and 0 deletions
25
docs/lib/source.ts
Normal file
25
docs/lib/source.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { type InferPageType, loader } from "fumadocs-core/source";
|
||||
import { docs } from "@/.source";
|
||||
|
||||
// See https://fumadocs.vercel.app/docs/headless/source-api for more info
|
||||
export const source = loader({
|
||||
baseUrl: "/docs",
|
||||
source: docs.toFumadocsSource(),
|
||||
});
|
||||
|
||||
export function getPageImage(page: InferPageType<typeof source>) {
|
||||
const segments = [...page.slugs, "image.png"];
|
||||
|
||||
return {
|
||||
segments,
|
||||
url: `/og/docs/${segments.join("/")}`,
|
||||
};
|
||||
}
|
||||
|
||||
export async function getLLMText(page: InferPageType<typeof source>) {
|
||||
const processed = await page.data.getText("processed");
|
||||
|
||||
return `# ${page.data.title} (${page.url})
|
||||
|
||||
${processed}`;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue