Skip to content

About

Learn more about my development journey here.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

nhattrinh.github.io

My personal portfolio website built with Astro, Tailwind CSS, and MDX.

🌐 Live Site: https://nhattrinh.github.io

🚀 Tech Stack

  • Astro - Static site generator
  • Tailwind CSS - Utility-first CSS framework
  • MDX - Markdown with JSX support
  • TypeScript - Type safety

📁 Project Structure

/
├── public/
│   └── resume.pdf          # Downloadable resume
├── src/
│   ├── components/
│   │   ├── ProjectCard.astro
│   │   └── ThemeToggle.astro
│   ├── content/
│   │   ├── config.ts       # Content collection schema
│   │   └── projects/       # MDX project files
│   ├── layouts/
│   │   └── BaseLayout.astro
│   ├── pages/
│   │   ├── index.astro     # Home page
│   │   ├── about.astro     # About page
│   │   └── projects/
│   │       ├── index.astro # Projects list
│   │       └── [slug].astro # Project detail
│   └── styles/
│       └── global.css      # Tailwind styles
├── .github/
│   └── workflows/
│       └── deploy.yml      # GitHub Actions deployment
├── astro.config.mjs
├── package.json
└── tsconfig.json

🛠️ Local Development

Prerequisites

  • Node.js 18+ (recommended: 20+)
  • npm

Setup

  1. Clone the repository:

    git clone https://github.com/nhattrinh/nhattrinh.github.io.git
    cd nhattrinh.github.io
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Open http://localhost:4321 in your browser.

Available Commands

Command Action
npm run dev Start dev server at localhost:4321
npm run build Build production site to ./dist/
npm run preview Preview production build locally

📝 Adding Projects

  1. Create a new .mdx file in src/content/projects/:

    ---
    title: "Project Name"
    description: "Brief description"
    date: 2024-01-01
    tags: ["React", "Node.js"]
    repo: "https://github.com/nhattrinh/project"
    demo: "https://demo-url.com"
    featured: true
    image: "/images/project-preview.png"
    ---
    
    ## About This Project
    
    Your MDX content here...
  2. The project will automatically appear on the Projects page.

🌙 Dark Mode

The site supports dark mode with:

  • System preference detection on first load
  • Manual toggle with localStorage persistence
  • No flash of unstyled content (FOUC)

🚀 Deployment

This site deploys automatically to GitHub Pages via GitHub Actions when you push to the main branch.

GitHub Settings Required

  1. Go to your repository Settings → Pages
  2. Under "Build and deployment", set Source to GitHub Actions
  3. Ensure the workflow has read/write permissions:
    • Settings → Actions → General
    • Under "Workflow permissions", select Read and write permissions

Manual Deployment

You can also trigger a deployment manually:

  1. Go to Actions tab
  2. Select Deploy to GitHub Pages
  3. Click Run workflow

📄 License

MIT License - feel free to use this as a template for your own portfolio!


Built with ❤️ using Astro

About

Learn more about my development journey here.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages