Skip to content

Commit

Permalink
feat: add PostCSS configuration, Tailwind CSS integration, and enhanc…
Browse files Browse the repository at this point in the history
…e API documentation
  • Loading branch information
joao-vasconcelos committed Jan 2, 2025
1 parent d371af8 commit bec1702
Show file tree
Hide file tree
Showing 15 changed files with 3,265 additions and 206 deletions.
11 changes: 3 additions & 8 deletions app/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* * */

import { source } from '@/lib/source';
import { openapi, source } from '@/lib/source';
import { createTypeTable } from 'fumadocs-typescript/ui';
import defaultMdxComponents from 'fumadocs-ui/mdx';
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page';
Expand Down Expand Up @@ -37,16 +37,11 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
const { AutoTypeTable } = createTypeTable();

return (
<DocsPage
full={page.data.full}
tableOfContent={{ single: false, style: 'clerk' }}
tableOfContentPopover={{ style: 'clerk' }}
toc={page.data.toc}
>
<DocsPage full={page.data.full} toc={page.data.toc}>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
<MDX components={{ ...defaultMdxComponents, AutoTypeTable }} />
<MDX components={{ ...defaultMdxComponents, APIPage: openapi.APIPage, AutoTypeTable }} />
</DocsBody>
</DocsPage>
);
Expand Down
11 changes: 5 additions & 6 deletions app/global.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* * */
/* BODY */
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
display: flex;
flex-direction: column;
min-height: 100vh;
.prose {
--tw-prose-body: hsl(var(--foreground) / 0.8);
}


Expand Down
7 changes: 2 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import type { ReactNode } from 'react';

import 'fumadocs-ui/style.css';
import { RootProvider } from 'fumadocs-ui/provider';
import { Inter } from 'next/font/google';

Expand All @@ -19,10 +18,8 @@ const inter = Inter({
export default function Layout({ children }: { children: ReactNode }) {
return (
<html className={inter.className} lang="en" suppressHydrationWarning>
<body>
<RootProvider search={{ options: { type: 'static' } }}>
{children}
</RootProvider>
<body className="flex flex-col min-h-screen">
<RootProvider>{children}</RootProvider>
</body>
</html>
);
Expand Down
Loading

0 comments on commit bec1702

Please sign in to comment.