Table of Contents
A modern, fast, and SEO-optimized personal blog and portfolio website built with Astro. Originally created with Gatsby and migrated to Astro for better performance and developer experience.
- β‘ Lightning Fast: Built with Astro for optimal performance
- π± Responsive Design: Mobile-first approach with Tailwind CSS
- π¨ Modern UI: Clean, accessible design with smooth animations
- π Content Collections: Type-safe content management with MDX
- π SEO Optimized: Built-in sitemap, RSS feeds, and meta tags
- π Portfolio Showcase: Dedicated section for project highlights
- π·οΈ Tag System: Organized content with tags and categories
- π Dark Mode Ready: Prepared for future dark mode implementation
- π§ͺ Testing: Comprehensive test suite with Vitest
- π¦ TypeScript: Full type safety throughout the application
- Astro - Static site generator
- Tailwind CSS v4 - Utility-first CSS framework
- TypeScript - Type safety
- MDX - Markdown with JSX support
- React - Interactive components
- Vitest - Unit testing
- ESLint - Code linting
- Netlify - Hosting and deployment
src/
βββ components/ # Reusable UI components
β βββ blog-post-card.astro
β βββ portfolio-card.astro
β βββ header.astro
β βββ headerlink.astro
βββ content/ # Content collections
β βββ blog/ # Blog posts (MDX)
β βββ portfolio/ # Portfolio projects (MDX)
β βββ config.ts # Collection schemas
βββ layouts/ # Page layouts
β βββ layout.astro # Base layout component
β βββ blogpost.astro # Blog post layout
βββ pages/ # Astro pages
β βββ index.astro # Homepage
β βββ about.astro # About page
β βββ blog/ # Blog pages
β βββ portfolio/ # Portfolio pages
βββ styles/ # Global styles
β βββ global.css # Tailwind imports and custom styles
βββ utils/ # Utility functions
- Node.js >= 20
- Bun (recommended) or npm/yarn
-
Clone the repository
git clone <your-repo-url> cd oluwasetemi.dev
-
Install dependencies
# Using Bun (recommended) bun install # Or using npm npm install
-
Start the development server
bun dev # or npm run dev -
Open your browser Navigate to
http://localhost:4321
# Start development server
bun dev
# Build for production
bun run build
# Preview production build
bun run preview
# Run linting
bun run lint
# Fix linting issues
bun run lint:fix
# Run tests
bun test
# Run tests with UI
bun run test:ui# Build the site
bun run build
# Preview the build
bun run previewCreate new blog posts in src/content/blog/:
---
title: "My New Blog Post"
description: "A brief description of the post"
pubDate: 2024-01-15
tags: ["astro", "web-development", "tutorial"]
heroImage: "/path/to/image.jpg"
---
# My New Blog Post
Your content here...Add portfolio projects in src/content/portfolio/:
---
title: "Project Name"
description: "Project description"
date: 2024-01-15
tags: ["react", "typescript", "tailwind"]
url: "https://project-url.com"
github: "https://github.com/username/project"
tech: ["React", "TypeScript", "Tailwind CSS"]
heroImage: "/path/to/project-image.jpg"
---
# Project Details
Project description and details...This project uses Tailwind CSS v4 with a custom configuration:
- Custom Colors: Accent colors defined in
tailwind.config.js - Custom Fonts: IBM Plex Mono and Ubuntu font stack
- Component Classes: Reusable component styles in
global.css - Responsive Design: Mobile-first approach with breakpoint utilities
Add custom styles in src/styles/global.css:
@import "tailwindcss";
@layer base {
/* Base styles */
}
@layer components {
/* Component styles */
}
@layer utilities {
/* Utility styles */
}The project includes a comprehensive test suite:
# Run all tests
bun test
# Run tests with UI
bun run test:ui
# Run tests in watch mode
bun test --watchTests are written using:
- Vitest - Fast unit testing framework
- Testing Library - React component testing
- jsdom - DOM environment for testing
This site is deployed on Netlify with the following features:
- Automatic Deploys: Connected to Git repository
- Edge Functions: Server-side functionality
- CDN: Global content delivery
- HTTPS: Secure by default
The site uses the @astrojs/netlify adapter for optimal Netlify integration:
// astro.config.ts
import netlify from "@astrojs/netlify";
export default defineConfig({
output: "server",
adapter: netlify({
edgeMiddleware: false,
}),
});astro.config.ts- Astro configurationtailwind.config.js- Tailwind CSS configurationtsconfig.json- TypeScript configurationeslint.config.js- ESLint rules and settingsvitest.config.ts- Test configuration
Create a .env file for local development:
# Site configuration
SITE_URL=https://oluwasetemi.dev- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write tests for new features
- Use conventional commit messages
- Ensure all linting checks pass
- Maintain responsive design principles
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Ojo Oluwasetemi Stephen