Developer Portfolio & Blog
A modern, high-performance personal portfolio and blog built with Astro.js. Designed to showcase your projects and technical writing with blazing-fast performance and exceptional SEO.
β¨ Features
- π Blazing fast performance - Built with Astro.js for optimal loading speeds
- π Full-featured blog - Support for technical articles with code highlighting
- π¨ Beautiful UI - Modern, responsive design powered by Tailwind CSS
- π Dark mode support - Seamless light/dark theme switching
- π± Fully responsive - Looks great on all devices from mobile to desktop
- π SEO optimized - Structured data, meta tags, and optimized for search engines
- π·οΈ Tag system - Categorize blog posts and projects with tags
- π Content collection - Organized content management with Astroβs content collections
- πΌοΈ Project showcase - Display your work with images, descriptions, and technology tags
π οΈ Tech Stack
- Astro.js - Static site generator with excellent performance
- React.js - For interactive components
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type safety and improved developer experience
- MDX - Markdown with JSX for rich content creation
- Preact - Lightweight alternative to React for UI components
π Prerequisites
Before you begin, ensure you have the following installed:
βοΈ Installation & Setup
-
Clone the repository
git clone https://github.com/cojocaru-david/portfolio.git cd portfolio
-
Install dependencies
npm install # or yarn install
-
Start the development server
npm run dev # or yarn dev
-
Open your browser Navigate to
http://localhost:4321
to see the site running locally.
π Project Structure
portfolio/βββ public/ # Static assetsβββ src/β βββ components/ # UI componentsβ βββ content/ # Content collectionsβ β βββ blog/ # Blog posts in MD/MDX formatβ β βββ projects/ # Project dataβ βββ layouts/ # Page layoutsβ βββ lib/ # Utility functionsβ βββ pages/ # Page routesβ βββ styles/ # Global stylesβββ astro.config.mjs # Astro configurationβββ tailwind.config.cjs # Tailwind CSS configurationβββ tsconfig.json # TypeScript configurationβββ package.json # Project dependencies
π Usage
Creating a Blog Post
- Create a new
.mdx
or.md
file insrc/content/blog
- Add frontmatter with title, description, date, tags, and authors
- Write your content using Markdown and MDX components
---
title: "Your Post Title"
description: "A brief description of your post"
date: 2025-04-20
tags: ["tag1", "tag2", "tag3"]
authors: ["Your Name", "Co-author (optional)"]
---
# Your Post Title
Write your content here using Markdown.
## Subheading
More content...
Adding a Project
- Create a new
.md
file in projects - Add project details including name, description, tags, and image path
π Dark Mode
The project includes dark mode support using Tailwind CSS and Preact. It detects user preferences and applies the appropriate theme, with an option to toggle between light and dark modes.
π Data Utilities
The project includes several utility functions in data-utils.ts:
getAllPosts()
- Retrieve all blog postsgetRecentPosts(count)
- Get the most recent postsgetAdjacentPosts(currentId)
- Get next and previous postsgetAllTags()
- Get all tags used in postsgetSortedTags()
- Get tags sorted by usage countgetPostsByAuthor(authorId)
- Get all posts by a specific author
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.