-
+
Create an account
-
+
Enter your email below to create your account
-
-
+
+
By clicking continue, you agree to our{" "}
-
+
{posts?.length ? (
-
+
{posts.map((post) => (
))}
diff --git a/app/(docs)/docs/[[...slug]]/page.tsx b/app/(docs)/docs/[[...slug]]/page.tsx
index b6e525a81..0587b48a6 100644
--- a/app/(docs)/docs/[[...slug]]/page.tsx
+++ b/app/(docs)/docs/[[...slug]]/page.tsx
@@ -1,7 +1,6 @@
import { notFound } from "next/navigation"
-import { allDocs } from "contentlayer/generated"
+import { docs as allDocs } from "#site/content"
-import { getTableOfContents } from "@/lib/toc"
import { Mdx } from "@/components/mdx-components"
import { DocsPageHeader } from "@/components/page-header"
import { DocsPager } from "@/components/pager"
@@ -87,19 +86,18 @@ export default async function DocPage({ params }: DocPageProps) {
notFound()
}
- const toc = await getTableOfContents(doc.body.raw)
return (
-
+
diff --git a/app/(docs)/guides/[...slug]/page.tsx b/app/(docs)/guides/[...slug]/page.tsx
index d4016b464..f5ee0301d 100644
--- a/app/(docs)/guides/[...slug]/page.tsx
+++ b/app/(docs)/guides/[...slug]/page.tsx
@@ -1,8 +1,7 @@
import Link from "next/link"
import { notFound } from "next/navigation"
-import { allGuides } from "contentlayer/generated"
+import { guides as allGuides } from "#site/content"
-import { getTableOfContents } from "@/lib/toc"
import { Icons } from "@/components/icons"
import { Mdx } from "@/components/mdx-components"
import { DocsPageHeader } from "@/components/page-header"
@@ -89,27 +88,25 @@ export default async function GuidePage({ params }: GuidePageProps) {
notFound()
}
- const toc = await getTableOfContents(guide.body.raw)
-
return (
diff --git a/app/(docs)/guides/page.tsx b/app/(docs)/guides/page.tsx
index 9d0ebd073..963336785 100644
--- a/app/(docs)/guides/page.tsx
+++ b/app/(docs)/guides/page.tsx
@@ -1,5 +1,5 @@
import Link from "next/link"
-import { allGuides } from "contentlayer/generated"
+import { guides as allGuides } from "#site/content"
import { compareDesc } from "date-fns"
import { formatDate } from "@/lib/utils"
@@ -28,7 +28,7 @@ export default function GuidesPage() {
{guides.map((guide) => (
{guide.featured && (
@@ -46,7 +46,7 @@ export default function GuidesPage() {
)}
{guide.date && (
-
+
{formatDate(guide.date)}
)}
diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsx
index 8c7614065..ab46f0d26 100644
--- a/app/(docs)/layout.tsx
+++ b/app/(docs)/layout.tsx
@@ -15,7 +15,7 @@ interface DocsLayoutProps {
export default function DocsLayout({ children }: DocsLayoutProps) {
return (
-
+
@@ -30,7 +30,7 @@ export default function DocsLayout({ children }: DocsLayoutProps) {
target="_blank"
rel="noreferrer"
>
-
+
GitHub
diff --git a/app/(editor)/editor/[postId]/page.tsx b/app/(editor)/editor/[postId]/page.tsx
index 784adda99..7fdc6cde8 100644
--- a/app/(editor)/editor/[postId]/page.tsx
+++ b/app/(editor)/editor/[postId]/page.tsx
@@ -1,5 +1,5 @@
import { notFound, redirect } from "next/navigation"
-import { Post, User } from "@prisma/client"
+import type { Post, User } from "@prisma/client"
import { authOptions } from "@/lib/auth"
import { db } from "@/lib/db"
diff --git a/app/(marketing)/[...slug]/page.tsx b/app/(marketing)/[...slug]/page.tsx
index 02797a11e..7c59e87e2 100644
--- a/app/(marketing)/[...slug]/page.tsx
+++ b/app/(marketing)/[...slug]/page.tsx
@@ -1,5 +1,5 @@
import { notFound } from "next/navigation"
-import { allPages } from "contentlayer/generated"
+import { pages as allPages } from "#site/content"
import { Mdx } from "@/components/mdx-components"
@@ -85,15 +85,15 @@ export default async function PagePage({ params }: PageProps) {
return (
-
+
{page.title}
{page.description && (
-
{page.description}
+
{page.description}
)}
-
+
)
}
diff --git a/app/(marketing)/blog/[...slug]/page.tsx b/app/(marketing)/blog/[...slug]/page.tsx
index 6889a585c..09fdedb19 100644
--- a/app/(marketing)/blog/[...slug]/page.tsx
+++ b/app/(marketing)/blog/[...slug]/page.tsx
@@ -1,5 +1,5 @@
import { notFound } from "next/navigation"
-import { allAuthors, allPosts } from "contentlayer/generated"
+import { authors as allAuthors, posts as allPosts } from "#site/content"
import { Mdx } from "@/components/mdx-components"
@@ -103,19 +103,19 @@ export default async function PostPage({ params }: PostPageProps) {
"absolute left-[-200px] top-14 hidden xl:inline-flex"
)}
>
-
+
See all posts
{post.date && (
)}
-
+
{post.title}
{authors?.length ? (
@@ -123,7 +123,7 @@ export default async function PostPage({ params }: PostPageProps) {
{authors.map((author) =>
author ? (
@@ -136,7 +136,7 @@ export default async function PostPage({ params }: PostPageProps) {
/>
{author.title}
-
+
@{author.twitter}
@@ -152,15 +152,15 @@ export default async function PostPage({ params }: PostPageProps) {
alt={post.title}
width={720}
height={405}
- className="my-8 rounded-md border bg-muted transition-colors"
+ className="bg-muted my-8 rounded-md border transition-colors"
priority
/>
)}
-
+
-
+
See all posts
diff --git a/app/(marketing)/blog/page.tsx b/app/(marketing)/blog/page.tsx
index 38b903003..d7a3010e3 100644
--- a/app/(marketing)/blog/page.tsx
+++ b/app/(marketing)/blog/page.tsx
@@ -1,7 +1,7 @@
import Image from "next/image"
import Link from "next/link"
-import { allPosts } from "contentlayer/generated"
import { compareDesc } from "date-fns"
+import { posts as allPosts } from "#site/content"
import { formatDate } from "@/lib/utils"
@@ -20,10 +20,10 @@ export default async function BlogPage() {
-
+
Blog
-
+
A blog built using Contentlayer. Posts are written in MDX.
@@ -33,7 +33,7 @@ export default async function BlogPage() {
{posts.map((post, index) => (
{post.image && (
@@ -42,7 +42,7 @@ export default async function BlogPage() {
alt={post.title}
width={804}
height={452}
- className="rounded-md border bg-muted transition-colors"
+ className="bg-muted rounded-md border transition-colors"
priority={index <= 1}
/>
)}
@@ -51,7 +51,7 @@ export default async function BlogPage() {
{post.description}
)}
{post.date && (
-
+
{formatDate(post.date)}
)}
diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx
index 902099c54..38e4fd431 100644
--- a/app/(marketing)/layout.tsx
+++ b/app/(marketing)/layout.tsx
@@ -15,7 +15,7 @@ export default async function MarketingLayout({
}: MarketingLayoutProps) {
return (
-
+