Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AGENTS.md - AI Agent Guidelines for celeroncoder.tech
# AGENTS.md - AI Agent Guidelines for celeroncoder.com

> Personal portfolio website built with Next.js 13 (App Router), TypeScript, and Tailwind CSS.

Expand Down Expand Up @@ -130,9 +130,12 @@ export function Projects() {
1. **Client components**: Components using `motion`, hooks, or event handlers need `"use client"`
2. **Fonts**: none are loaded; the site uses system Times New Roman / Courier New on purpose.
3. **Anchor navigation**: Section IDs use lowercase (`id={title.toLowerCase()}`)
4. **Home page**: name, then the full post list (`components/post-index.tsx`). No about or projects
sections; that data in `lib/site-content.ts` still feeds the Markdown mirrors (`lib/markdown-pages.ts`).
5. **No API routes**: Static portfolio site
4. **Home page**: name, then the full post list (`components/post-index.tsx`). The Markdown mirror
(`lib/markdown-pages.ts`) matches it: name, all posts, contact links.
5. **SEO**: site-wide name, OG/Twitter image (the GitHub avatar URL) and handle live in
`lib/site-content.ts`. There is deliberately no site-wide description. Child `openGraph`/`twitter`
objects replace the layout's wholesale, so pages that set them must pass every field (including `images`).
6. **No API routes**: Static portfolio site

---

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ All notable changes to this project are documented here. The format is based on

### Changed

- **Link previews and SEO**: the site URL is now `https://www.celeroncoder.com`
(the old `.tech` domain is gone). Every page has Open Graph and Twitter
cards using the GitHub avatar; posts use their 1200×630 hero crop when they
have one. The old "Full Stack Web Developer based in Jaipur" title and
description are removed (pages other than posts have no description), titles use a `%s | Khushal
Bhardwaj` template, pages set their own canonical URL, and 404s are noindex.
- **Markdown home mirror matches the home page**: `/.md` is now the name,
every post, and contact links. The old headline,
skills, about, and projects content is removed from `lib/site-content.ts`.
- **Early-web redesign**: every page is a plain white document in Times New
Roman with classic blue/purple underlined links, a `[ GitHub | Twitter ]`
link bar, encyclopedia-style titles, text straight on the page (no card), a
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# celeroncoder.tech
# celeroncoder.com

This is my personal portfolio website.

Expand Down
43 changes: 40 additions & 3 deletions app/(frontend)/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { Media as MediaType, Tag } from "@/payload-types";
import { extractHeadings } from "@/lib/blog-toc";
import { ContentsBox } from "@/components/contents-box";
import { RetroPage, RetroTitle } from "@/components/retro-page";
import { SITE_IMAGE, SITE_NAME, SITE_URL, TWITTER_HANDLE } from "@/lib/site-content";

export const dynamic = "force-dynamic";

Expand All @@ -29,12 +30,48 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
limit: 1,
});

if (!post) return { title: "Post not found" };
if (!post) return { title: "Post not found", robots: { index: false, follow: false } };

const title = post.meta?.title || post.title;
const description = post.meta?.description || post.excerpt;
const url = `/blog/${slug}`;
const hero = typeof post.heroImage === "object" ? post.heroImage : null;
const heroFile = hero?.sizes?.hero?.url ? hero.sizes.hero : hero;
const image = heroFile?.url
? {
url: heroFile.url,
alt: hero?.alt || title,
...(heroFile.width && heroFile.height
? { width: heroFile.width, height: heroFile.height }
: {}),
}
: SITE_IMAGE;

return {
title: `${post.meta?.title || post.title} | Khushal Bhardwaj`,
description: post.meta?.description || post.excerpt,
title,
description,
openGraph: {
type: "article",
url,
siteName: SITE_NAME,
title,
description,
locale: "en_US",
publishedTime: post.publishedAt,
modifiedTime: post.updatedAt,
authors: [SITE_URL],
images: [image],
},
twitter: {
card: heroFile?.url ? "summary_large_image" : "summary",
site: TWITTER_HANDLE,
creator: TWITTER_HANDLE,
title,
description,
images: [image],
},
alternates: {
canonical: url,
types: {
"text/markdown": `/blog/${slug}.md`,
},
Expand Down
22 changes: 20 additions & 2 deletions app/(frontend)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@ export const dynamic = "force-dynamic";
import type { Metadata } from "next";
import { PostIndex } from "@/components/post-index";
import { RetroPage, RetroTitle } from "@/components/retro-page";
import { SITE_IMAGE, SITE_NAME, TWITTER_HANDLE } from "@/lib/site-content";

const title = `Blog | ${SITE_NAME}`;

export const metadata: Metadata = {
title: "Blog | Khushal Bhardwaj",
description: "Blog posts by Khushal Bhardwaj",
title: "Blog",
openGraph: {
type: "website",
url: "/blog",
siteName: SITE_NAME,
title,
locale: "en_US",
images: [SITE_IMAGE],
},
twitter: {
card: "summary",
site: TWITTER_HANDLE,
creator: TWITTER_HANDLE,
title,
images: [SITE_IMAGE],
},
alternates: {
canonical: "/blog",
types: {
"text/markdown": "/blog.md",
},
Expand Down
29 changes: 26 additions & 3 deletions app/(frontend)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,35 @@ import type { Metadata, Viewport } from "next";
import Script from "next/script";
import { Analytics } from "@vercel/analytics/next";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { SITE_URL } from "@/lib/site-content";
import {
SITE_IMAGE,
SITE_NAME,
SITE_URL,
TWITTER_HANDLE,
} from "@/lib/site-content";

export const metadata: Metadata = {
metadataBase: new URL(SITE_URL),
title: "Khushal Bhardwaj",
description: "Full-stack Software Engineer",
title: {
default: SITE_NAME,
template: `%s | ${SITE_NAME}`,
},
authors: [{ name: SITE_NAME, url: SITE_URL }],
creator: SITE_NAME,
openGraph: {
type: "website",
siteName: SITE_NAME,
title: SITE_NAME,
locale: "en_US",
images: [SITE_IMAGE],
},
twitter: {
card: "summary",
site: TWITTER_HANDLE,
creator: TWITTER_HANDLE,
title: SITE_NAME,
images: [SITE_IMAGE],
},
icons: {
icon: "/icon.svg",
apple: "/icon.svg",
Expand Down
2 changes: 1 addition & 1 deletion app/(frontend)/llm-markdown/[[...path]]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export async function GET(_request: Request, { params }: RouteContext) {
collection: "posts",
where: POSTS_WITH_SLUG,
sort: "-publishedAt",
limit: 5,
pagination: false,
});

return markdownResponse(
Expand Down
6 changes: 6 additions & 0 deletions app/(frontend)/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import type { Metadata } from "next";
import Link from "next/link";
import { RetroPage, RetroTitle } from "@/components/retro-page";

export const metadata: Metadata = {
title: "Page not found",
robots: { index: false, follow: false },
};

export default function NotFound() {
return (
<RetroPage>
Expand Down
27 changes: 23 additions & 4 deletions app/(frontend)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,32 @@ export const dynamic = "force-dynamic";
import type { Metadata } from "next";
import { PostIndex } from "@/components/post-index";
import { RetroPage, RetroTitle } from "@/components/retro-page";
import { profile } from "@/lib/site-content";
import {
profile,
SITE_IMAGE,
SITE_NAME,
TWITTER_HANDLE,
} from "@/lib/site-content";

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.",
title: { absolute: SITE_NAME },
openGraph: {
type: "website",
url: "/",
siteName: SITE_NAME,
title: SITE_NAME,
locale: "en_US",
images: [SITE_IMAGE],
},
twitter: {
card: "summary",
site: TWITTER_HANDLE,
creator: TWITTER_HANDLE,
title: SITE_NAME,
images: [SITE_IMAGE],
},
alternates: {
canonical: "/",
types: {
"text/markdown": "/.md",
},
Expand Down
33 changes: 3 additions & 30 deletions lib/markdown-pages.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import type { Post, Tag } from "@/payload-types";
import {
aboutParagraphs,
profile,
projects,
skills,
socialLinks,
writingLinks,
} from "@/lib/site-content";
Expand Down Expand Up @@ -47,22 +44,7 @@ function postHtmlUrl(origin: string, slug: string): string {
}

export function renderHomeMarkdown(posts: Post[], origin: string): string {
const projectSections = projects.map((project) => {
const links = [
project.githubUrl
? markdownLink("GitHub", project.githubUrl)
: "Private repository",
project.liveUrl ? markdownLink("Live", project.liveUrl) : null,
].filter((link): link is string => link !== null);

return [
`### ${project.title}`,
project.description,
links.join(" | "),
].join("\n\n");
});

const blogItems = posts.map(
const postItems = posts.map(
(post) =>
`- ${markdownLink(post.title, postMarkdownUrl(origin, post.slug))} (${formatDate(post.publishedAt)})`,
);
Expand All @@ -75,17 +57,8 @@ export function renderHomeMarkdown(posts: Post[], origin: string): string {

return [
`# ${profile.name}`,
`**${profile.headline}**`,
profile.introduction,
"## Top skills",
skills.map((skill) => `- ${skill}`).join("\n"),
"## About",
aboutParagraphs.join("\n\n"),
"## Projects",
projectSections.join("\n\n"),
"## Blog",
blogItems.length > 0 ? blogItems.join("\n") : "No posts yet.",
markdownLink("View all posts", absoluteUrl(origin, "/blog.md")),
"## Posts",
postItems.length > 0 ? postItems.join("\n") : "No posts yet.",
"## Contact",
contactLinks.map((link) => `- ${link}`).join("\n"),
].join("\n\n");
Expand Down
73 changes: 10 additions & 63 deletions lib/site-content.ts
Original file line number Diff line number Diff line change
@@ -1,72 +1,19 @@
export const SITE_URL = "https://celeroncoder.tech";
export const SITE_URL = "https://www.celeroncoder.com";
export const SITE_NAME = "Khushal Bhardwaj";
// GitHub avatar, served by GitHub so it works on every deployment.
export const SITE_IMAGE = {
url: "https://avatars.githubusercontent.com/u/76873719?v=4",
width: 375,
height: 375,
alt: "Khushal Bhardwaj",
} as const;
export const TWITTER_HANDLE = "@celeroncoder";

export const profile = {
name: "Khushal Bhardwaj",
email: "celeroncoder@gmail.com",
headline: "Full Stack Web Developer",
introduction:
"Full Stack Web Developer based in Jaipur, India. Passionate about building web apps with React and Next.js. Currently an undergrad at VIT Bhopal University.",
} as const;

export const about = {
beforeName: "Hey, I'm ",
afterName:
", 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.",
writing:
"Other than programming, I write blogs. I've developed a hobby of writing blogs, mostly technical. Although I may not be following it that regularly, you might think, but I do love it.",
} as const;

export const aboutParagraphs = [
`${about.beforeName}${profile.name}${about.afterName}`,
about.writing,
] as const;

export const skills = [
"TypeScript",
"Next.js",
"tRPC",
"Express.js",
"Prisma",
"Tailwind CSS",
] as const;

export type Project = {
title: string;
description: string;
githubUrl?: string;
liveUrl?: string;
};

export const projects: Project[] = [
{
title: "Shire",
description:
"A macOS native Claude Code wrapper with all the functionalities of Claude Code",
githubUrl: "https://github.com/celeroncoder/shire",
liveUrl: "https://shire.celeroncoder.com",
},
{
title: "Curewell Admin",
description:
"Extensive CRM Dashboard for Homeopathic Clinic built with Next.js and tRPC",
},
{
title: "PlayerStatPML",
description:
"Express-TypeScript API proxy for Premier League statistics",
githubUrl: "https://github.com/celeronCoder/playerstatpml",
liveUrl:
"https://rapidapi.com/celeronCoder/api/premier-league-player-and-club-statistics",
},
{
title: "winston-highstorm",
description:
"NPM Package for winston Transport to ingest logs to highstorm.app",
githubUrl: "https://github.com/celeronCoder/winston-highstorm",
liveUrl: "https://link.celeroncoder.tech/winston-transport-npm",
},
];

export const socialLinks = [
{ name: "GitHub", url: "https://github.com/celeroncoder" },
{ name: "Twitter", url: "https://twitter.com/celeroncoder" },
Expand Down