Skip to content
Velloreth
Projects 4 min read

How I Rebuilt My Portfolio Site (And What I Learned)

First-person account of rebuilding a portfolio site with Astro: what survived, what got cut, performance targets, and lessons from shipping a static site.

By

I rebuilt my portfolio site because the old one had become hard to touch. Every change required fighting a build pipeline I no longer understood, dependencies I had not updated in a year, and a framework that shipped more JavaScript than the page needed. The site was not doing its one job — showing work and making contact easy — and maintaining it had become a chore.

This is the account of the rebuild: what I kept, what I cut, the performance target I actually used, and the lessons that stuck.

What the old site was

The previous version was a React single-page application, client-rendered, with a JSON file of projects and a custom filter UI. It loaded a framework, a router, and a state library before showing a single sentence. On a slow connection the screen stayed blank until the JavaScript finished. It also had a commenting system that received zero comments in two years and a tag-filtering dashboard that I, the only user, opened twice.

It was overbuilt for a brochure site. I knew that intellectually; rebuilding forced me to admit it.

The rewrite: Astro, static, content collections

I chose Astro because a portfolio is static content with islands of interactivity. The home page, project pages, and the about page are plain HTML. A mobile navigation menu and a dark-mode toggle are the only things that hydrate on the client.

Content collections gave me a schema. Every project file has title, description, pubDate, tags, and featured. A missing or mistyped field fails the build before it reaches production. That single guarantee — the build refuses bad content — was worth the rewrite by itself.

import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';

const projects = defineCollection({
  loader: glob({ base: './src/content/projects', pattern: '**/*.{md,mdx}' }),
  schema: z.object({
    title: z.string().min(3).max(120),
    description: z.string().min(40).max(220),
    pubDate: z.coerce.date(),
    tags: z.array(z.string()).default([]),
    featured: z.boolean().default(false),
  }),
});

export const collections = { projects };

The schema evolved as I wrote. I started with title, description, pubDate. I added tags when I wanted a filtered list, featured when I wanted a pinned section, and heroImage when I wanted a lead image. Each addition went into the schema at the same time as the content, so nothing existed in Markdown that the build did not understand.

What survived and what got cut

I carried over twelve projects from the old site and rewrote each description. Four projects I had not touched in years got archived instead of migrated. The tag-filtering dashboard was cut entirely — replaced by a simple list and a tag page generated at build time. The commenting system was cut and replaced with an email address and a GitHub link.

Cutting felt like losing work, but the site loaded faster and took less time to maintain. The test for keeping anything was: does a visitor need it? Not do I like it, not did I spend time building it. Does a visitor need it?

Performance target

I set one measurable goal: first paint under one second on a mid-tier phone over 4G, and zero render-blocking JavaScript on the home page. I did not chase a perfect Lighthouse score; a perfect score on localhost does not mean fast in Mumbai or Nairobi.

Astro ships almost no JavaScript by default, so the home page scored near the target immediately. The only client-side component is the navigation toggle, which I hydrated with client:click so it costs nothing until someone taps it.

Images were the remaining cost. I served WebP with responsive widths and lazy-loaded anything below the fold. Project thumbnail images went from 400 kilobytes each to about 40 kilobytes, which mattered more than any framework choice.

What I would do differently

Ship earlier. I spent two weeks on a custom 404 page and an animated cursor before the project pages were live. Neither mattered. The site should have been public with nine projects and a contact email in the first deploy; everything after was additive.

Content before chrome. I designed the layout before I had final copy, then rewrote the copy to fit the layout. Backwards. Copy and projects first, design second.

Redirects from day one. I mapped old URLs to new ones in the build and added a redirect file so old links do not return 404. I did it in the first week, not after launch, because broken links from old résumés and tweets are invisible until someone clicks them.

One metric, not a dashboard. I added page-view analytics, then ignored them. The number that matters is whether someone gets in touch after seeing the site. I replaced the dashboard with a simple contact form and stopped watching traffic.

The result

The rebuilt site is a folder of Markdown, a few Astro templates, and a dist directory of static files. It deploys by uploading a folder. It loads fast on a cheap phone. It has not needed a dependency update in six months.

The lesson was not “Astro is better than React.” It was that a portfolio is a publishing job, not an application. Publish the work, make contact easy, remove everything else, and ship before it is perfect.

Frequently asked questions

Why Astro for a portfolio?
A portfolio is mostly static content with occasional interactivity. Astro sends zero client JavaScript by default and hydrates only the components that need it, which keeps page loads fast and hosting simple.
What did you cut from the old site?
A project database with filterable tags, a blog commenting system, and a custom analytics dashboard. None of them were used, and removing them made the site faster and easier to maintain.
How do you handle a site rebuild without losing old URLs?
Map old URLs to new ones and add redirects. Astro can generate redirect rules at build time, or you handle them at the host level; the key is not letting old links go to 404.
Is a portfolio site worth rebuilding?
Only if the current one fails at its job — showing your work and making contact easy. A redesign for its own sake is procrastination; a rebuild that removes friction is shipping.