Elias Almqvist 8 months ago
parent 4d672e134a
commit 40e52a23e5
No known key found for this signature in database
GPG Key ID: E31A99CE3E75A158
  1. 10
      next.config.js
  2. 4
      next.config.mjs
  3. 6
      package.json
  4. 1314
      pnpm-lock.yaml
  5. 7
      src/app/[...dir]/layout.tsx
  6. 0
      src/app/[...dir]/page.tsx
  7. 12
      src/app/layout.tsx
  8. 2
      src/app/page.tsx
  9. 9
      src/components/theme-provider.tsx
  10. 7
      src/mdx-components.tsx
  11. 2
      tailwind.config.ts

@ -0,0 +1,10 @@
const withMDX = require('@next/mdx')()
/** @type {import('next').NextConfig} */
const nextConfig = {
// Configure `pageExtensions` to include MDX files
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
// Optionally, add any other Next.js config below
};
module.exports = withMDX(nextConfig);

@ -1,4 +0,0 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;

@ -11,11 +11,17 @@
"ui:add": "pnpm dlx shadcn-ui@latest add" "ui:add": "pnpm dlx shadcn-ui@latest add"
}, },
"dependencies": { "dependencies": {
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.1.4",
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.0.2",
"@tailwindcss/typography": "^0.5.12",
"@types/mdx": "^2.0.12",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.1.0", "clsx": "^2.1.0",
"lucide-react": "^0.363.0", "lucide-react": "^0.363.0",
"next": "14.1.4", "next": "14.1.4",
"next-themes": "^0.3.0",
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"tailwind-merge": "^2.2.2", "tailwind-merge": "^2.2.2",

File diff suppressed because it is too large Load Diff

@ -0,0 +1,7 @@
const Layout = ({
children,
}: Readonly<{
children: React.ReactNode;
}>) => <div className="prose dark:prose-dark max-w-screen-lg">{children}</div>;
export default Layout;

@ -8,6 +8,7 @@ export const metadata: Metadata = {
}; };
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { ThemeProvider } from "@/components/theme-provider";
const fontSans = FontSans({ const fontSans = FontSans({
subsets: ["latin"], subsets: ["latin"],
@ -23,11 +24,20 @@ export default function RootLayout({
<html lang="en"> <html lang="en">
<body <body
className={cn( className={cn(
"min-h-screen bg-background font-sans antialiased", "min-h-screen bg-background text-foreground font-sans antialiased",
fontSans.className, fontSans.className,
)} )}
> >
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<main className="w-full flex flex-col justify-center">
{children} {children}
</main>
</ThemeProvider>
</body> </body>
</html> </html>
); );

@ -1,5 +1,5 @@
import Image from "next/image"; import Image from "next/image";
export default function Home() { export default function Home() {
return <></>; return <h1>TEST</h1>;
} }

@ -0,0 +1,9 @@
"use client";
import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { type ThemeProviderProps } from "next-themes/dist/types";
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
}

@ -0,0 +1,7 @@
import type { MDXComponents } from "mdx/types";
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...components,
};
}

@ -78,7 +78,7 @@ const config = {
}, },
}, },
}, },
plugins: [require("tailwindcss-animate")], plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
} satisfies Config; } satisfies Config;
export default config; export default config;

Loading…
Cancel
Save