Skip to content

Lesson 28 of 32Resume and portfolio

Building and Shipping Your Portfolio

Pick a simple stack, put it on your own domain, make it share and search well, keep it fast and accessible, and keep it current with a small routine.

20 min read0/5 questions

Most portfolios that never launch die in the stack decision. Someone spends three weekends choosing between frameworks, a headless CMS and a design system, and the job applications go out with a GitHub link instead. The site itself is a small static thing: a few pages, some images, maybe a blog. It needs to be on your own domain, load fast, look right when shared on LinkedIn, and be easy enough to update that you actually do. This lesson takes you from "which framework" to a live, linked, maintained site, with the decisions a senior engineer would make and the commands to make them.

For the hands-on HTML and CSS build, see Project: A Portfolio Page in the HTML and CSS track. For what goes on the site, see What a Portfolio Is For and Writing Project Case Studies.

Picking a stack: static is enough

A portfolio has no logged-in users and no data that changes per request. That means it can be static: plain files built once and served from a CDN. Static sites are fast by default, cheap or free to host, and almost impossible to break or hack, because there is no server code running.

OptionGood forWatch out for
Plain HTML and CSSOne page, maximum speed, zero buildCopying the header into every page once you have several
AstroContent sites with a blog in Markdown or MDX; ships no JavaScript unless you askAnother tool to learn if you only need one page
Next.js with output: 'export'You are applying for React or Next.js roles and want the site to show itServer features (Server Actions, cookies, default image optimization) do not work in an export
Next.js on Vercel (not exported)You want server features such as a contact form handlerMore moving parts than a portfolio usually needs

The tie-breaker is the job you want. A frontend candidate whose site is a fast, accessible Next.js or Astro build gets to talk about it in interviews. A backend candidate can use plain HTML or a template and spend the saved time on the API projects that matter for their role.

next.config.ts
import type { NextConfig } from "next";
 
const nextConfig: NextConfig = {
  output: "export", // next build writes static files to out/
  images: { unoptimized: true }, // the default loader needs a server
};
 
export default nextConfig;

When a blog or CMS helps

Add a blog only if you will write in it. Three short posts about real problems you solved ("How I stopped double bookings with a Postgres row lock") are strong evidence. An empty blog page with one post from two years ago is a don't. If you do write, keep posts as Markdown or MDX files in the repo: they are versioned with git, need no database, and deploy with every push. A headless CMS is worth it only when someone non-technical edits the content, which is not the case for a personal site.

Templates versus from scratch

A template is fine when the site is not the thing you are trying to prove: a data engineer or backend developer loses nothing by using a well-made Astro theme. Change the colours and type, delete every section you have no content for, and credit the author if the licence asks. Build from scratch when you are applying for frontend or design-engineering roles, because a reviewer may open devtools, and a template with your name on it is not your work. Either way, never ship the template's sample content.

Domain names and DNS

Buy yourname.dev, yourname.com or a close variant from any mainstream registrar. Short and spellable beats clever. Turn on auto-renew, because an expired domain can be bought by someone else, and your old resume links then point at their site. Note that .dev is on the browser HSTS preload list, so it only works over HTTPS; every host below gives you HTTPS automatically, so that is no problem.

DNS is the phone book that turns your domain into the address of your host. You change it at whoever runs your nameservers (usually the registrar). You will touch two record types:

  • An A record points a name at an IPv4 address. Used for the apex (bare) domain, priyashah.dev.
  • A CNAME record points a name at another name. Used for www.priyashah.dev, pointing at your host's domain.

Some DNS providers support an ALIAS, ANAME or flattened CNAME at the apex, which several hosts prefer. Each host's "add custom domain" screen tells you the exact records; copy them from there rather than from a blog post.

What happens when a recruiter opens priyashah.dev
BrowserDNS resolverYour DNSHost CDNwhere is priyashah.dev?lookup priyashah.devA 185.199.108.153185.199.108.153GET / over HTTPSindex.html from the nearest edge

The browser asks a resolver (from the ISP or a public one). If it has a fresh cached answer, it replies at once.

1/6

The IP in the diagram is one of GitHub Pages' published apex addresses. GitHub's docs list four A records for an apex domain, a CNAME for www pointing at yourname.github.io, and recommend verifying the domain in your account settings so nobody else can claim it if your site is ever disabled.

Deploying

All four mainstream hosts serve static sites on a free tier, give you HTTPS and a custom domain, and can deploy on every git push. The best workflow is the same everywhere: connect the GitHub repo in the host's dashboard and let it build on push, with a preview URL for every pull request. The CLIs are useful for a first deploy, for a site with no repo yet, or for debugging.

Vercel detects most frameworks and needs no config. The first deploy of a new project goes to production; after that, vercel makes a preview and vercel --prod updates the live site.

npm install -g vercelvercel loginvercelvercel --prod

Netlify deploys a built folder. Without --prod you get a draft URL to check first.

npm install -g netlify-clinetlify loginnetlify deploy --dir=distnetlify deploy --prod --dir=dist

Cloudflare now tells you to start new projects on Workers rather than Pages. A static site on Workers needs only a small config file that points at your build folder; check the Workers static assets docs for current options.

wrangler.jsonc
{
  "name": "priya-portfolio",
  "compatibility_date": "2026-10-22",
  "assets": { "directory": "./dist" }
}
npx wrangler loginnpx wrangler deploy

Existing Cloudflare Pages projects still deploy a folder with npx wrangler pages deploy dist.

GitHub Pages is free for public repos and keeps everything in one place. In the repo's Settings, under Pages, choose GitHub Actions as the source, then add a workflow. GitHub offers starter workflows for common frameworks from that same screen; this one builds any site whose npm run build writes to dist/. Action versions move, so compare the majors with the starter before you copy it.

.github/workflows/pages.yml
name: Deploy to GitHub Pages
on:
  push:
    branches: [main]
  workflow_dispatch:
 
permissions:
  contents: read
  pages: write
  id-token: write
 
concurrency:
  group: pages
  cancel-in-progress: false
 
jobs:
  deploy:
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with:
          node-version: 24
          cache: npm
      - run: npm ci
      - run: npm run build
      - uses: actions/configure-pages@v6
      - uses: actions/upload-pages-artifact@v5
        with:
          path: dist
      - id: deployment
        uses: actions/deploy-pages@v5

One trap: a GitHub Pages project site lives under a subpath (yourname.github.io/portfolio/), so absolute links like /styles.css break until you set the framework's base path or use a custom domain. A user site in a repo named yourname.github.io lives at the root and avoids this.

Quick check
You pushed a CSS fix to main, the host says the deploy succeeded, but the live site looks unchanged. What do you check first?
Need a nudge? A hint rules out a wrong answer.

SEO and sharing

Recruiters search your name, and your link gets pasted into LinkedIn, Slack and email. Both depend on a handful of tags in each page's head. The Head and SEO lesson in the HTML and CSS track covers what each tag means; this is the portfolio version.

index.html (head)
<title>Priya Shah, backend developer</title>
<meta name="description" content="Python and Postgres APIs. Looking for a junior backend role, remote or Leeds.">
<link rel="canonical" href="https://priyashah.dev/">
<meta property="og:title" content="Priya Shah, backend developer">
<meta property="og:description" content="Python and Postgres APIs. Looking for a junior backend role.">
<meta property="og:image" content="https://priyashah.dev/og.png">
<meta property="og:url" content="https://priyashah.dev/">
<meta name="twitter:card" content="summary_large_image">
  • Title: your name and role, unique per page, under about 60 characters so it is not cut off in results.
  • Canonical URL: one official address per page. Pick https:// and either www or apex, redirect the other, and use that form everywhere.
  • Open Graph image: 1200 by 630 pixels is the common size. Your name, role and one project screenshot, readable as a thumbnail. It must be an absolute URL, because the scrapers that build preview cards do not reliably resolve relative paths.
  • Sitemap and robots.txt: Astro has an official sitemap integration (npx astro add sitemap), and Next.js generates one from app/sitemap.ts. Submit it in Google Search Console, which also confirms Google can see your site.

Here is a preflight check you can run on any head before sharing. Edit the head string to fix the problems and run it again.

JavaScript
const head = `<title>Priya Shah, backend developer</title><meta name="description" content="Python and Postgres APIs. Looking for a junior backend role."><link rel="canonical" href="https://priyashah.dev/"><meta property="og:title" content="Priya Shah, backend developer"><meta property="og:image" content="/og.png">`; const checks = [ ["title", /<title>([^<]+)<\/title>/], ["description", /<meta name="description" content="([^"]+)"/], ["canonical", /<link rel="canonical" href="([^"]+)"/], ["og:title", /<meta property="og:title" content="([^"]+)"/], ["og:description", /<meta property="og:description" content="([^"]+)"/], ["og:image", /<meta property="og:image" content="([^"]+)"/],]; const problems = [];for (const [name, re] of checks) { const m = head.match(re); if (!m) { problems.push(`missing ${name}`); continue; } const value = m[1]; if (name === "title" && value.length > 60) problems.push(`title is ${value.length} chars, may be cut off`); if (name === "description" && value.length > 160) problems.push("description over 160 chars"); if (name === "og:image" && !value.startsWith("https://")) problems.push("og:image must be an absolute https URL");} console.log(problems.length === 0 ? "ready to share" : problems.join("\n"));console.log(`${checks.length - problems.length}/${checks.length} checks passed`);
Output
Press Run (⌘ Enter) to see what happens.
Predict the outputJavaScript

What does this print?

const page = "https://sam.dev/blog/first-post/";
const ogImage = "og.png";
console.log(new URL(ogImage, page).href);
Need a nudge? Hints walk you through it.

Performance and accessibility budget

A budget is a number you agree not to exceed, checked on every change. For a portfolio, a sensible one:

  • Lighthouse performance, accessibility, best practices and SEO all 90 or higher on mobile.
  • Core Web Vitals in the "good" range: LCP 2.5 s or less, INP 200 ms or less, CLS 0.1 or less.
  • No more JavaScript than the page needs. A static Astro or plain HTML page can ship close to none.
  • Zero errors from axe.

You can run Lighthouse from the terminal against the live site as well as from Chrome DevTools, and the axe CLI checks the same page for accessibility errors. Both run through npx; check each tool's docs for current flags.

npx lighthouse https://priyashah.dev --viewnpx @axe-core/cli https://priyashah.dev

Lab scores from Lighthouse run on your machine under simulated conditions. PageSpeed Insights also shows field data from real Chrome users once your site has enough traffic, which is what Google actually uses. The usual fixes are dull and effective: compress and correctly size images, set width and height so nothing shifts, load fonts with font-display: swap and use one or two families, and defer anything decorative.

Match the pairs0/5 matched

Match each Lighthouse finding to the most likely fix.

Choose an item, then its match on the other side.

Analytics and contact

You do not need analytics, but it is motivating to see that a recruiter from the company you applied to opened your flagship case study. Pick a privacy-friendly tool such as Plausible, Umami, GoatCounter, Cloudflare Web Analytics or Vercel Web Analytics. They count page views without cookies or personal profiles, which usually means no cookie banner. Check each tool's own docs for that claim in your region. A banner on a personal site is clutter, and a heavy tracking script costs you performance points.

For contact, a plain mailto: link is the most reliable option and what most reviewers prefer: it opens their own mail app and nothing can break. Expect some spam once your address is public; a separate address for job hunting keeps it manageable. A form is worth it only if you want to ask structured questions. If you add one, use your host's form feature (Netlify Forms) or a form service rather than writing a backend, and add a honeypot field and the provider's spam filter. Always keep the email link as a backup, because forms fail silently.

Quick check
Which contact setup is best for a junior developer's portfolio?
Need a nudge? A hint rules out a wrong answer.

Linking everything together

Your site, GitHub and LinkedIn should point at each other and tell the same story.

  • GitHub profile README: create a public repo with exactly your username as its name, and its README appears at the top of your profile. Keep it to three lines: who you are, what you want, a link to the portfolio. Pin your three to six best repos, each with a description and the live URL in the repo's website field.
  • LinkedIn: put the portfolio URL in your contact info, and add your flagship case study to the Featured section, where it shows as a card with your preview image.
  • Resume: portfolio URL in the header, and each project line links to its case study.

Check that the name, role and target ("junior backend, remote or Leeds") match on all four. A mismatch between LinkedIn and your site makes a recruiter wonder which one is current.

Keeping it current

A portfolio decays: demos break, dependencies age, and your best work stops being your best. A small routine beats an annual rebuild.

A maintenance routine
  1. Every push

    Automatic checks

    The host builds a preview. CI runs the build and, if you set it up, Lighthouse and a link checker against the preview.

  2. Monthly

    Demo check, 15 minutes

    Open every live demo, log in with the demo account, wake sleeping backends, and fix or remove anything broken.

  3. Quarterly

    Content review, 1 hour

    Reorder projects, retire the weakest, update the footer date and the 'looking for' line, run the full review checklist, update dependencies.

  4. After each project

    Write it up

    Add a case study while the decisions are fresh, and a short post about the hardest bug.

  5. Yearly

    Renew and refresh

    Confirm the domain auto-renews, refresh the Open Graph image and screenshots, consider a visual refresh only if the site looks dated.

Writing short posts is the cheapest way to keep a site alive. Four hundred words on "what broke when I moved my API to Postgres 18, and how I found it" is useful to other developers, shows how you think, and gives an interviewer something specific to ask about.

Put it in order7 steps

Put the launch steps in a sensible order.

  1. Tap the steps below in the right order.
Need a nudge? A hint shows where it starts.

Your resume and portfolio are now live. The next unit puts them to work: finding roles, getting referrals, and turning interviews into an offer.

Key terms
static site
A site built ahead of time into plain HTML, CSS and JavaScript files that any CDN can serve, with no server code per request.
DNS
The system that maps a domain name to the address of the server or CDN that hosts it.
A record / CNAME
DNS records that point a name at an IP address (A) or at another name (CNAME).
TTL
Time to live: how long resolvers may cache a DNS answer before asking again.
canonical URL
The one official address of a page, declared with a link tag so search engines do not split it across duplicates.
Open Graph
Meta tags (og:title, og:description, og:image) that control the preview card when a link is shared.
performance budget
Limits such as Lighthouse 90 or more and LCP 2.5 s or less that every change must stay within.