-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation site #24
Changes from all commits
9597110
bc43eff
c29ec13
e0438e2
ddd4c6f
27f0a4e
5b59393
46ef15d
f7fe9b5
e18811f
946e6e3
fe1be3e
d580558
21dcd6d
ebfa2f1
1ac8061
10791e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** Auto-generated */ | ||
declare const map: Record<string, unknown> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do all these files have to be in the root dir? Am a big fan of a clean root dir. |
||
|
||
export { map } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type { MDXComponents } from 'mdx/types' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are |
||
import defaultComponents from 'fumadocs-ui/mdx' | ||
import type { ReactNode } from 'react' | ||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | ||
import { Step, Steps } from 'fumadocs-ui/components/steps' | ||
import { Callout } from 'fumadocs-ui/components/callout' | ||
|
||
export function useMDXComponents(components: MDXComponents): MDXComponents { | ||
return { | ||
...defaultComponents, | ||
...components, | ||
Tab, | ||
Tabs, | ||
InstallTabs: ({ | ||
items, | ||
children, | ||
}: { | ||
items: string[] | ||
children: ReactNode | ||
}) => ( | ||
<Tabs items={items} id="package-manager"> | ||
{children} | ||
</Tabs> | ||
), | ||
Step, | ||
Steps, | ||
Callout, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generated at build time. It essentially creates a 'map', as per the file name, of all the docs pages so that they can be looped through by the loader and rendered.