🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Astro Themes••By Komal Nakrani

Astro Resume Website: Build a CV Site Step by Step

Build an Astro resume website: keep your CV in JSON Resume format, render a one-page resume, add a print stylesheet, PDF export, Person schema and a custom domain.

#Astro#Resume Website#Portfolio#Tutorial

An Astro resume website keeps your CV as structured data (a single JSON file in the JSON Resume format works well), renders it into a clean, one-page HTML resume, and adds a print stylesheet so the same page exports to a tidy PDF. The result is a fast personal site on your own domain that recruiters can read on a phone, search engines can index under your name, and you can update by editing one file.

Key Takeaways

  • Store the resume in one data file; the page, the PDF and the structured data all read from it.
  • The JSON Resume schema is an open standard with fields for work, education, skills and projects.
  • Semantic HTML (<section>, <h2>, <time>, lists) makes the resume readable by screen readers and applicant tracking tools.
  • A @media print stylesheet turns the page into a clean PDF from any browser.
  • Person structured data helps search engines connect the page to your name and profiles.

Plan the site

A resume site can be one page or a small personal site. A useful structure:

  • / the resume itself, with a short intro at the top.
  • /projects/ (optional) a few case studies with images and links.
  • /resume.pdf a downloadable PDF of the same content.

Start a minimal project:

npm create astro@latest my-resume -- --template minimal
cd my-resume
npm run dev

Step 1: Write your resume as data

JSON Resume is an open, community-maintained schema for resumes. Using it means your data is portable to other tools and themes later.

{
  "basics": {
    "name": "Jordan Lee",
    "label": "Senior Frontend Engineer",
    "email": "[email protected]",
    "url": "https://jordanlee.dev",
    "summary": "Frontend engineer focused on fast, accessible web apps. Eight years building design systems and content platforms.",
    "location": { "city": "Toronto", "countryCode": "CA" },
    "profiles": [
      { "network": "GitHub", "username": "jordanlee", "url": "https://github.com/jordanlee" },
      { "network": "LinkedIn", "username": "jordanlee", "url": "https://www.linkedin.com/in/jordanlee" }
    ]
  },
  "work": [
    {
      "name": "Northwind",
      "position": "Senior Frontend Engineer",
      "startDate": "2022-03",
      "summary": "Lead engineer for the customer dashboard.",
      "highlights": [
        "Rebuilt the design system in TypeScript, used by 6 product teams",
        "Cut dashboard load time by moving reports to server rendering"
      ]
    }
  ],
  "education": [
    { "institution": "University of Waterloo", "area": "Computer Science", "studyType": "BSc", "endDate": "2018" }
  ],
  "skills": [
    { "name": "Frontend", "keywords": ["TypeScript", "Astro", "React", "CSS"] },
    { "name": "Practices", "keywords": ["Accessibility", "Performance", "Design systems"] }
  ]
}

Save it as src/data/resume.json. Astro can import JSON directly, and with TypeScript you get autocompletion on the fields. If you want build-time validation, load it through a Content Collection with the file() loader and a Zod schema instead.

Step 2: Create the layout

---
// src/layouts/Resume.astro
import '../styles/resume.css';
interface Props { title: string; description: string }
const { title, description } = Astro.props;
---
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>{title}</title>
    <meta name="description" content={description} />
    <link rel="canonical" href={new URL(Astro.url.pathname, Astro.site)} />
    <slot name="head" />
  </head>
  <body>
    <main class="resume"><slot /></main>
  </body>
</html>

Step 3: Render the resume

---
// src/pages/index.astro
import Resume from '../layouts/Resume.astro';
import resume from '../data/resume.json';

const { basics, work, education, skills } = resume;
const month = (d?: string) =>
  d ? new Date(`${d}-01`).toLocaleDateString('en-US', { month: 'short', year: 'numeric' }) : 'Present';
---
<Resume title={`${basics.name}, ${basics.label}`} description={basics.summary}>
  <header>
    <h1>{basics.name}</h1>
    <p class="label">{basics.label}</p>
    <ul class="contact">
      <li><a href={`mailto:${basics.email}`}>{basics.email}</a></li>
      <li>{basics.location.city}</li>
      {basics.profiles.map((p) => <li><a href={p.url} rel="me">{p.network}</a></li>)}
      <li class="no-print"><a href="/resume.pdf" download>Download PDF</a></li>
    </ul>
    <p class="summary">{basics.summary}</p>
  </header>

  <section aria-labelledby="experience">
    <h2 id="experience">Experience</h2>
    {work.map((job) => (
      <article class="entry">
        <div class="entry-head">
          <h3>{job.position}, {job.name}</h3>
          <p class="dates">
            <time datetime={job.startDate}>{month(job.startDate)}</time> to{' '}
            {job.endDate ? <time datetime={job.endDate}>{month(job.endDate)}</time> : 'Present'}
          </p>
        </div>
        <p>{job.summary}</p>
        <ul>{job.highlights.map((h) => <li>{h}</li>)}</ul>
      </article>
    ))}
  </section>

  <section aria-labelledby="skills">
    <h2 id="skills">Skills</h2>
    <dl class="skills">
      {skills.map((s) => (<><dt>{s.name}</dt><dd>{s.keywords.join(', ')}</dd></>))}
    </dl>
  </section>

  <section aria-labelledby="education">
    <h2 id="education">Education</h2>
    {education.map((e) => (
      <p><strong>{e.studyType} {e.area}</strong>, {e.institution}, {e.endDate}</p>
    ))}
  </section>
</Resume>

The output is plain, semantic HTML: headings in order, lists for highlights and a definition list for skills. That structure helps screen readers and the parsers some applicant tracking systems use, and it means the page ships with no JavaScript at all. rel="me" on profile links lets services verify that the profiles belong to you.

Step 4: Style it for screen and print

/* src/styles/resume.css */
:root {
  --text: #18181b;
  --muted: #52525b;
  --accent: #2563eb;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

.resume { max-width: 46rem; margin: 0 auto; padding: 3rem 1.5rem; }
h1 { font-size: 2.25rem; margin: 0; }
.label { color: var(--muted); margin: 0.25rem 0 1rem; }
.contact { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; }
h2 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-top: 2.5rem; }
.entry { margin-top: 1.25rem; break-inside: avoid; }
.entry-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.entry-head h3 { font-size: 1rem; margin: 0; }
.dates { color: var(--muted); font-size: 0.9rem; margin: 0; }
.skills { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
.skills dt { font-weight: 600; }

@media print {
  @page { size: A4; margin: 14mm; }
  :root { font-size: 10.5pt; }
  .resume { padding: 0; max-width: none; }
  .no-print { display: none; }
  a { color: inherit; text-decoration: none; }
  h2 { margin-top: 1.25rem; }
}

break-inside: avoid keeps a job from splitting across pages, and the @page rule sets paper size and margins. Use size: letter for US resumes. The Astro styling guide covers scoped versus global styles if you prefer to move these rules into components.

Step 5: Export a PDF

The quickest route is the browser: open the built page, print, and choose “Save as PDF”. The print stylesheet does the formatting. Save the file as public/resume.pdf and commit it.

To automate it, generate the PDF after each build with Playwright:

npm install -D playwright
npx playwright install chromium
// scripts/pdf.mjs
import { chromium } from 'playwright';
import { preview } from 'astro';

const server = await preview({ root: '.' });
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto(`http://localhost:${server.port}/`, { waitUntil: 'networkidle' });
await page.pdf({ path: 'dist/resume.pdf', format: 'A4', printBackground: true, preferCSSPageSize: true });
await browser.close();
await server.stop();

Add "postbuild": "node scripts/pdf.mjs" to package.json. The script starts Astro’s preview server through the programmatic API, prints the page to dist/resume.pdf, and stops the server, so the PDF always matches the site.

Step 6: Person structured data

Tell search engines who the page is about, using the same data:

---
// src/components/PersonSchema.astro
import resume from '../data/resume.json';
const { basics, work } = resume;
const schema = {
  '@context': 'https://schema.org',
  '@type': 'Person',
  name: basics.name,
  jobTitle: basics.label,
  url: basics.url,
  email: `mailto:${basics.email}`,
  worksFor: work[0] && !('endDate' in work[0]) ? { '@type': 'Organization', name: work[0].name } : undefined,
  sameAs: basics.profiles.map((p) => p.url),
};
---
<script type="application/ld+json" set:html={JSON.stringify(schema)} />

Place it in the layout’s head slot with <PersonSchema slot="head" /> on the home page. The sameAs list links your site to your GitHub and LinkedIn profiles. The Astro SEO guide covers titles, canonical URLs and Open Graph images.

Step 7: Add projects (optional)

If you have work to show, add a projects collection with a title, role, year, cover image and link, then render cards on /projects/ and a short list on the resume. Keep the resume page itself to one or two printed pages; the projects page is where detail goes. The Astro image lightbox is handy for screenshots.

Step 8: Deploy on your own domain

Set site: 'https://jordanlee.dev' in astro.config.mjs, run npm run build, and deploy dist/ to Cloudflare Pages, Netlify, Vercel or GitHub Pages, all free for a personal site. Then point your domain at the host; the custom domains docs walk through DNS. Your name as a domain is the single most useful thing for being found by recruiters searching your name.

Starting from a resume template

If you’d rather customize a design than build one, free community options include Astrofy, a portfolio and CV starter, and other personal templates on astro.build/themes. Komal Nakrani’s personal category is small, with a few CV themes such as Allex, a personal portfolio template for showcasing work, skills and experience, and Cypher CV, which offers six colour schemes. For a resume combined with a larger portfolio, the portfolio and agency category has far more choice. The official Astro data files docs cover JSON imports.

FAQ

Is Astro good for a resume website?

Yes. A resume site is mostly static content, which Astro renders as plain HTML with no JavaScript, so it loads instantly on any device. You can keep the resume in a data file, generate a PDF from the same page and host it free on Cloudflare Pages, Netlify, Vercel or GitHub Pages.

What should a resume website include?

Your name and role, a short summary, work experience with highlights, skills, education and contact links, plus a downloadable PDF. Optional extras are a projects page with case studies, a photo and links to GitHub or LinkedIn. Keep the main page scannable in under a minute.

What is JSON Resume?

JSON Resume is an open, community-driven JSON schema for resumes, with sections such as basics, work, education, skills and projects. Writing your resume in this format keeps the data separate from the design, so you can render it with Astro and reuse it in other tools.

How do I make my resume website print well?

Add a @media print stylesheet that hides navigation and buttons, sets font size in points, and uses @page to set paper size and margins. Apply break-inside: avoid to each job entry so it doesn’t split across pages, then test with the browser’s print preview.

Can I host a resume website for free?

Yes. A static Astro build can be hosted free on Cloudflare Pages, Netlify, Vercel or GitHub Pages. The only cost is usually a custom domain, which is worth it because your name as a domain is easy to share and find.