diff --git a/.gitignore b/.gitignore index 17cdd65..0b0dac7 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,7 @@ next-env.d.ts # payload /public/media payload.db + +# pnpm local store cache +.pnpm-store/ +pnpm-workspace.yaml diff --git a/app/(frontend)/blog/[slug]/page.tsx b/app/(frontend)/blog/[slug]/page.tsx index ad5859b..5f1b8ea 100644 --- a/app/(frontend)/blog/[slug]/page.tsx +++ b/app/(frontend)/blog/[slug]/page.tsx @@ -15,8 +15,7 @@ type Props = { }; export async function generateMetadata({ params }: Props): Promise { - const { slug } = await params; - const payload = await getPayload({ config }); + const [{ slug }, payload] = await Promise.all([params, getPayload({ config })]); const { docs: [post], } = await payload.find({ @@ -34,8 +33,7 @@ export async function generateMetadata({ params }: Props): Promise { } export default async function BlogPostPage({ params }: Props) { - const { slug } = await params; - const payload = await getPayload({ config }); + const [{ slug }, payload] = await Promise.all([params, getPayload({ config })]); const { docs: [post], } = await payload.find({ @@ -57,7 +55,7 @@ export default async function BlogPostPage({ params }: Props) { href="/blog" className="text-neutral-500 text-sm hover:text-white transition-colors duration-300" > - Back to blog + Back to blog @@ -66,7 +64,7 @@ export default async function BlogPostPage({ params }: Props) {

{post.title}

- + {new Date(post.publishedAt).toLocaleDateString("en-US", { year: "numeric", month: "long", @@ -118,7 +116,7 @@ export default async function BlogPostPage({ params }: Props) { href="/blog" className="text-neutral-500 text-sm hover:text-white transition-colors duration-300" > - Back to all posts + Back to all posts
diff --git a/app/(frontend)/blog/page.tsx b/app/(frontend)/blog/page.tsx index 185e24c..5da82a0 100644 --- a/app/(frontend)/blog/page.tsx +++ b/app/(frontend)/blog/page.tsx @@ -26,7 +26,7 @@ export default async function BlogPage() { href="/" className="text-neutral-500 text-sm hover:text-white transition-colors duration-300" > - Back + Back @@ -44,7 +44,7 @@ export default async function BlogPage() {
- + {new Date(post.publishedAt).toLocaleDateString("en-US", { year: "numeric", month: "short", diff --git a/app/(frontend)/layout.tsx b/app/(frontend)/layout.tsx index 9ea4b38..f50e9fe 100644 --- a/app/(frontend)/layout.tsx +++ b/app/(frontend)/layout.tsx @@ -29,7 +29,7 @@ export default function RootLayout({ }) { return ( - + {children} diff --git a/app/(frontend)/not-found.tsx b/app/(frontend)/not-found.tsx index 5cb255c..a9c24bd 100644 --- a/app/(frontend)/not-found.tsx +++ b/app/(frontend)/not-found.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; export default function NotFound() { return ( -
+

404

This page doesn't exist.

diff --git a/app/(frontend)/page.tsx b/app/(frontend)/page.tsx index 159895a..77193fa 100644 --- a/app/(frontend)/page.tsx +++ b/app/(frontend)/page.tsx @@ -1,5 +1,6 @@ export const dynamic = "force-dynamic"; +import type { Metadata } from "next"; import { About } from "@/components/about"; import { Blogs } from "@/components/blogs"; import { Footer } from "@/components/footer"; @@ -10,9 +11,15 @@ import { Stack } from "@/components/stack"; import { HeroShader } from "@/components/hero-shader"; import Link from "next/link"; +export const metadata: Metadata = { + title: "Khushal Bhardwaj | Full Stack Web Developer", + description: + "Portfolio of Khushal Bhardwaj, a Full Stack Web Developer based in Jaipur, India, building web apps with React and Next.js.", +}; + export default function Home() { return ( -
+
{/* Navigation - top right */}
diff --git a/components/about.tsx b/components/about.tsx index e0794c7..65aa457 100644 --- a/components/about.tsx +++ b/components/about.tsx @@ -5,7 +5,7 @@ export function About() {

Hey, I'm{" "} - Khushal Bhardwaj — a + Khushal Bhardwaj, a Full Stack Web Developer based in Jaipur, India. Passionate about building web apps with React/NextJS. I'm also an undergrad at VIT Bhopal University. diff --git a/components/blogs.tsx b/components/blogs.tsx index 471d1cc..9115d27 100644 --- a/components/blogs.tsx +++ b/components/blogs.tsx @@ -27,7 +27,7 @@ export async function Blogs() { {post.title}

- + {new Date(post.publishedAt).toLocaleDateString("en-US", { year: "numeric", month: "short", @@ -53,7 +53,7 @@ export async function Blogs() { href="/blog" className="text-neutral-500 text-xs hover:text-white transition-colors duration-300 inline-block mt-2" > - View all posts + View all posts ); diff --git a/components/footer.tsx b/components/footer.tsx index 694a9a9..12ba2d5 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -11,7 +11,7 @@ export function Footer() { return (