mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 21:22:43 +00:00
docs(docs): add cli configuration and components
This commit is contained in:
1 parent
3a238c34d9
commit
94b4bc509b
10 files changed
+293
-4
No files matched your search
+26
-4
@@ -1,5 +1,10 @@
|
||||
import { defineConfig } from "fumapress";
|
||||
import { fumadocsMdx } from "fumapress/adapters/mdx";
|
||||
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";
|
||||
import { flexsearchPlugin } from "fumapress/plugins/flexsearch";
|
||||
import { llmsPlugin } from "fumapress/plugins/llms.txt";
|
||||
import { docs } from "./.source/server";
|
||||
@@ -9,11 +14,11 @@ export default defineConfig({
|
||||
name: "Docs",
|
||||
baseUrl: import.meta.env.DEV
|
||||
? "http://localhost:3000"
|
||||
: "https://docs.example.com",
|
||||
: "https://cs.prad.nu",
|
||||
git: {
|
||||
user: "your-github-user",
|
||||
user: "prdlk",
|
||||
branch: "main",
|
||||
repo: "docs",
|
||||
repo: "leetcode",
|
||||
},
|
||||
},
|
||||
content: {
|
||||
@@ -26,4 +31,21 @@ export default defineConfig({
|
||||
},
|
||||
})
|
||||
.plugins(flexsearchPlugin(), llmsPlugin())
|
||||
.adapters(fumadocsMdx());
|
||||
.adapters(
|
||||
fumadocsMdx({
|
||||
async getMdxComponents(page) {
|
||||
const source = await this.getLoader();
|
||||
return {
|
||||
...defaultMdxComponents,
|
||||
TypeTable,
|
||||
Steps,
|
||||
Step,
|
||||
Tabs,
|
||||
Tab,
|
||||
Accordion,
|
||||
Accordions,
|
||||
a: createRelativeLink(source, page),
|
||||
};
|
||||
},
|
||||
}),
|
||||
);
|
||||
Reference in new issue
Block a user