A blazing-fast, modern portfolio website for an AI Engineer, built with Astro 4.x and TailwindCSS.
π Live Site: behitek.com π¨ Framework: Astro 4.x π Styling: TailwindCSS 3.x π Content: MDX for blog posts
- β‘ Lightning Fast: < 1s load time with minimal JavaScript
- π Dark Mode: Smooth theme switching with persistence
- π± Fully Responsive: Mobile-first design
- π¨ Modern UI: Glass morphism, gradient accents, smooth animations
- π SEO Optimized: Complete meta tags, OpenGraph, Twitter cards
- π RSS Feed: Subscribe to blog updates
- βΏ Accessible: WCAG 2.1 AA compliant
- π 10+ technical articles about AI/ML, NLP, RAG, Python
- π Bilingual Support: English & Vietnamese posts (tagged)
- π·οΈ Smart Filtering: Filter by language and category
- π Table of Contents: Auto-generated with active section highlighting
- π Reading Progress: Visual progress bar
- π¬ Comments: Giscus (GitHub Discussions)
- π Share Buttons: Twitter, LinkedIn, Copy link
- β±οΈ Reading Time: Estimated time for each post
- π Featured projects: LCOJ, Inverted HyDE, hoc-bash
- π Categorized: Product, Research, Tutorial, Tool, Fun
- π·οΈ Tech stack tags
- π Links to GitHub, live demos, blog posts
- π― TypeScript for type safety
- π¨ Custom Tailwind theme with emerald green branding
- π¦ Content Collections for type-safe content
- πΌοΈ Optimized images with Astro Image
- π€ Google Tag Manager integration
- π GitHub Actions deployment
- Node.js 20.x or higher
- npm or pnpm
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewnpm run dev # Start dev server (http://localhost:4321)
npm run build # Build for production
npm run preview # Preview production build
npm run astro # Run Astro CLI commands/
βββ public/ # Static assets
β βββ images/ # Images (copied from old site)
β β βββ blog/ # Blog post images
β β βββ me.jpeg # Profile picture
β βββ favicon.ico
β βββ CNAME # Custom domain config
β βββ .nojekyll # GitHub Pages config
β
βββ src/
β βββ components/ # Reusable components
β β βββ Navbar.astro
β β βββ Footer.astro
β β βββ ThemeToggle.astro
β β βββ BlogCard.astro
β β βββ ProjectCard.astro
β β βββ LanguageBadge.astro
β β βββ TableOfContents.astro
β β βββ Giscus.astro
β β βββ SEO.astro
β β
β βββ layouts/ # Page layouts
β β βββ BaseLayout.astro
β β βββ BlogPostLayout.astro
β β
β βββ pages/ # Routes
β β βββ index.astro # Homepage
β β βββ blog/
β β β βββ index.astro # Blog listing
β β β βββ [...slug].astro # Blog post pages
β β βββ projects.astro
β β βββ contact.astro
β β βββ 404.astro
β β βββ rss.xml.ts # RSS feed
β β
β βββ content/ # Content collections
β β βββ blog/ # Blog posts (MDX)
β β β βββ inverted-hyde.mdx
β β βββ projects/ # Projects (JSON)
β β β βββ lcoj.json
β β β βββ inverted-hyde.json
β β β βββ hoc-bash.json
β β βββ config.ts # Content collection schemas
β β
β βββ styles/ # Global styles
β β βββ global.css # Tailwind + custom styles
β β
β βββ utils/ # Utility functions
β βββ constants.ts
β βββ helpers.ts
β
βββ .github/
β βββ workflows/
β βββ deploy.yml # GitHub Actions deployment
β
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json
Primary (Emerald Green):
- #10B981 (Main)
- #059669 (Dark)
- #34D399 (Light)
Accent:
- #06B6D4 (Cyan) - For highlights
- #8B5CF6 (Purple) - For AI/ML content
Neutral (Slate):
- Light mode: #FFFFFF background, #0F172A text
- Dark mode: #0F172A background, #F8FAFC text- Headings: Inter (Google Fonts)
- Body: System fonts for performance
- Code: JetBrains Mono / Fira Code
- Glass Morphism: Navbar with backdrop blur
- Bento Grid: About section layout
- Cards: Elevated cards with hover effects
- Badges: Language (EN/VI) and category badges
- Buttons: Primary (filled) and secondary (outlined)
- Create new MDX file in
src/content/blog/:
---
title: "Your Post Title"
description: "Brief description"
date: 2025-11-12
author: "Hieu Nguyen"
language: "en" # or "vi"
category: "AI/ML" # AI/ML, Python, Tutorial, Data
tags: ["tag1", "tag2"]
image: "/images/blog/your-image.jpg"
draft: false
---
Your content here...- Add images to
public/images/blog/ - Blog post will be automatically generated at
/blog/your-post-slug
- Create JSON file in
src/content/projects/:
{
"title": "Project Name",
"description": "Project description",
"category": "Product",
"tech": ["Python", "FastAPI", "Docker"],
"links": {
"website": "https://example.com",
"github": "https://github.com/..."
},
"featured": true,
"order": 1
}- Project will appear on homepage and projects page
- Enable GitHub Discussions in your repository
- Visit giscus.app
- Configure and get your repo ID and category ID
- Update
src/components/Giscus.astro:
script.setAttribute('data-repo', 'behitek/behitek.github.io');
script.setAttribute('data-repo-id', 'YOUR_REPO_ID');
script.setAttribute('data-category-id', 'YOUR_CATEGORY_ID');Update in src/layouts/BaseLayout.astro:
<script is:inline>
(function(w,d,s,l,i){...})(window,document,'script','dataLayer','YOUR_GTM_ID');
</script>Update public/CNAME with your domain:
behitek.com
- Push to main branch or designated branch
- GitHub Actions will automatically build and deploy
- Enable GitHub Pages in repo settings:
- Settings β Pages
- Source: GitHub Actions
# Build
npm run build
# Deploy dist/ folder to your hosting provider- Performance: 95+
- Accessibility: 95+
- Best Practices: 95+
- SEO: 100
- JavaScript: ~5-10 KB (vs 200 KB with Docusaurus)
- CSS: ~20 KB (with TailwindCSS purging)
- First Load: < 1 second
- Framework: Astro 4.x
- Styling: TailwindCSS 3.x
- Content: MDX with Content Collections
- Fonts: Google Fonts (Inter)
- Icons: Emoji + SVG
- Comments: Giscus
- Analytics: Google Tag Manager
- Hosting: GitHub Pages
- CI/CD: GitHub Actions
See MIGRATION_GUIDE.md for detailed migration steps.
Summary:
- Copy blog posts from
/blog/*.mdto/src/content/blog/*.mdx - Update frontmatter format
- Fix image paths:
/img/blogβ/images/blog - Remove
<!--truncate-->tags - Test each post
This is a personal portfolio, but suggestions and bug reports are welcome!
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Β© 2025 Hieu Nguyen. All rights reserved.
- Built with Astro
- Styled with TailwindCSS
- Comments powered by Giscus
- Hosted on GitHub Pages
- Email: [email protected]
- LinkedIn: linkedin.com/in/behitek
- GitHub: github.com/behitek
- Twitter: @behitek_
Built with β€οΈ by Hieu Nguyen