Skip to content

Repository files navigation

🧑🏻‍💻 My personal website

A minimal-JS personal site and blog built with Astro.

Stack

Project structure

├── public/                 # Static assets (favicon, robots.txt)
├── src/
│   ├── assets/             # Images processed by Astro (post covers, etc.)
│   ├── components/
│   ├── data/
│   │   └── blog/           # MDX posts (Content Collection: `posts`)
│   ├── layouts/
│   ├── pages/              # Routes (.astro, .ts endpoints)
│   ├── styles/             # Global + post typography (Tailwind @theme)
│   ├── utils/
│   ├── content.config.ts   # Collection schema + glob loader
│   └── env.d.ts
├── astro.config.ts
├── wrangler.jsonc          # Cloudflare Workers config
├── package.json
├── pnpm-lock.yaml
├── tsconfig.json
└── LICENSE

Routes

Path File Notes
/ pages/index.astro Home
/posts pages/posts/index.astro Blog index, grouped by year
/posts/[id] pages/posts/[id].astro Individual posts (prerendered)
/socials pages/socials.astro Social links
/contact pages/contact.astro Contact form
/llms.txt pages/llms.txt.ts Plain-text blog export for LLMs

Blog URLs use each post's collection id (the MDX filename stem), e.g. /posts/wirths-law.

Content

MDX lives in src/data/blog/ and is registered in src/content.config.ts. Each post requires this frontmatter:

title: 'Post title'
description: 'Short summary'
pubDate: 2024-01-14
draft: false
cover: '@assets/posts/cover.png'
coverAlt: 'Cover description'

Set draft: true to hide a post in production. Covers under src/assets/ go through Astro's image pipeline at build time.

Tailwind

There is no tailwind.config.js. Theme tokens live in CSS (src/styles/index.css, src/styles/posts.css) using Tailwind v4's CSS-first setup, wired through astro.config.tsvite.plugins: [tailwindcss()].

Scripts

Command Description
pnpm dev Start the dev server
pnpm start Type-check in watch mode + dev server
pnpm build Production build
pnpm preview Preview the production build locally
pnpm format Format with Prettier

Running locally

Requires Node.js 18.20.8+, 20.3.0+, or 22+.

git clone git@github.com:dreyfus92/astro-portfolio.git
cd astro-portfolio
pnpm install
pnpm dev

To preview the Cloudflare build locally:

pnpm build
pnpm preview

License

MIT — see LICENSE.

Releases

Packages

Used by

Contributors

Languages