2026-07-12 13:13:51 -04:00
|
|
|
import { defineConfig } from "fumapress";
|
|
|
|
|
import { fumadocsMdx } from "fumapress/adapters/mdx";
|
2026-07-12 18:50:57 -04:00
|
|
|
import defaultMdxComponents, { createRelativeLink } from "fumadocs-ui/mdx";
|
|
|
|
|
import { TypeTable } from "fumadocs-ui/components/type-table";
|
|
|
|
|
import { Step, Steps } from "fumadocs-ui/components/steps";
|
|
|
|
|
import { Tabs, Tab } from "fumadocs-ui/components/tabs";
|
|
|
|
|
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
|
2026-07-12 13:13:51 -04:00
|
|
|
import { flexsearchPlugin } from "fumapress/plugins/flexsearch";
|
|
|
|
|
import { llmsPlugin } from "fumapress/plugins/llms.txt";
|
|
|
|
|
import { docs } from "./.source/server";
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
site: {
|
|
|
|
|
name: "Docs",
|
|
|
|
|
baseUrl: import.meta.env.DEV
|
|
|
|
|
? "http://localhost:3000"
|
2026-07-12 18:50:57 -04:00
|
|
|
: "https://cs.prad.nu",
|
2026-07-12 13:13:51 -04:00
|
|
|
git: {
|
2026-07-12 18:50:57 -04:00
|
|
|
user: "prdlk",
|
2026-07-12 13:13:51 -04:00
|
|
|
branch: "main",
|
2026-07-12 18:50:57 -04:00
|
|
|
repo: "leetcode",
|
2026-07-12 13:13:51 -04:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
content: {
|
|
|
|
|
docs: docs.toFumadocsSource(),
|
|
|
|
|
},
|
|
|
|
|
meta: {
|
|
|
|
|
root() {
|
|
|
|
|
return <meta property="og:type" content="website" />;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.plugins(flexsearchPlugin(), llmsPlugin())
|
2026-07-12 18:50:57 -04:00
|
|
|
.adapters(
|
|
|
|
|
fumadocsMdx({
|
|
|
|
|
async getMdxComponents(page) {
|
|
|
|
|
const source = await this.getLoader();
|
|
|
|
|
return {
|
|
|
|
|
...defaultMdxComponents,
|
|
|
|
|
TypeTable,
|
|
|
|
|
Steps,
|
|
|
|
|
Step,
|
|
|
|
|
Tabs,
|
|
|
|
|
Tab,
|
|
|
|
|
Accordion,
|
|
|
|
|
Accordions,
|
|
|
|
|
a: createRelativeLink(source, page),
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
);
|