Files
supabase/apps/docs/app/contributing/page.tsx
T
Charis 837e314088 feat(docs): add visual contributing guide (#28214)
Add a contributing guide to docs, which links to resources for contributors
and includes examples of usable components when writing docs content.
2024-07-26 15:54:20 -04:00

27 lines
879 B
TypeScript

import { readFile } from 'node:fs/promises'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { ContributingToc } from '~/app/contributing/ContributingToC'
import { MDXProviderGuides } from '~/features/docs/GuidesMdx.client'
import { MDXRemoteBase } from '~/features/docs/MdxBase'
import { SidebarSkeleton } from '~/layouts/MainSkeleton'
export default async function ContributingPage() {
const contentFile = join(dirname(fileURLToPath(import.meta.url)), 'content.mdx')
const content = await readFile(contentFile, 'utf-8')
return (
<SidebarSkeleton>
<div className="px-8 py-16">
<article className="prose mx-auto">
<MDXProviderGuides>
<MDXRemoteBase source={content} />
</MDXProviderGuides>
</article>
<ContributingToc />
</div>
</SidebarSkeleton>
)
}