Built with โค๏ธ using Cursor and
Bolt.
A modern, responsive personal website built with React, TypeScript, and Vite. Features a bilingual blog system, interactive photo gallery, and optimized performance.
- Bilingual Support: English and Chinese content with seamless language switching
- Markdown-based: Write posts in Markdown with frontmatter metadata
- Advanced Filtering: Filter by tags and years with dynamic counts
- Subtitle Support: Optional subtitles for enhanced post descriptions
- Auto-generated Excerpts: Smart excerpt generation for both languages
- Reading Time Estimation: Automatic calculation based on content length
- Cover Images: Local image support with optimized loading
- Masonry Layout: Beautiful responsive grid with optimized performance
- Lightbox Viewer: Full-screen image viewing with navigation
- Smart Filtering: Category and year filters with dynamic counts
- Randomization: Default random order with date sorting option
- Performance Optimized: Pagination, lazy loading, and hardware acceleration
- Hover Effects: Smooth zoom animations with GPU acceleration
- Dark/Light Mode: System preference detection with manual toggle
- Responsive Design: Mobile-first approach with Tailwind CSS
- Performance Optimized: Code splitting, lazy loading, and optimized builds
- SEO Friendly: Proper meta tags and semantic HTML
- Type Safety: Full TypeScript implementation
- Modern Tooling: Vite for fast development and optimized builds
- Frontend: React 18, TypeScript
- Styling: Tailwind CSS
- Build Tool: Vite
- Routing: React Router
- Animations: Framer Motion
- Icons: Lucide React
- Markdown: Gray Matter for frontmatter parsing
- Deployment: GitHub Pages with GitHub Actions
src/
โโโ components/
โ โโโ common/ # Shared components (Navbar, Footer, etc.)
โ โโโ blog/ # Blog-specific components
โ โโโ gallery/ # Gallery-specific components
โ โโโ home/ # Home page components
โโโ pages/ # Route components
โโโ context/ # React context providers
โโโ data/ # Data processing and utilities
โโโ markdown/posts/ # Blog post markdown files
โโโ types/ # TypeScript type definitions
โโโ index.css # Global styles and Tailwind imports
public/
โโโ images/
โโโ blog/covers/ # Blog post cover images
โโโ gallery/ # Gallery images
docs/ # Build output (GitHub Pages)
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone https://github.com/fyang0507/fyang0507.github.io.git cd fyang0507.github.io -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open in browser
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issues
-
Create markdown file in
src/markdown/posts/YYYY-MM-DD_post-title.md -
Add frontmatter
--- title: 'Your Post Title' subtitle: 'Optional subtitle' coverImage: '/images/blog/covers/your-image.jpg' date: '2024-01-15' tags: ['tag1', 'tag2'] languages: ['en', 'zh'] title_zh: 'ไธญๆๆ ้ข' subtitle_zh: 'ไธญๆๅฏๆ ้ข' tags_zh: ['ๆ ็ญพ1', 'ๆ ็ญพ2'] ---
-
Write content
Your English content here... ---zh--- ไฝ ็ไธญๆๅ ๅฎน...
-
Add cover image to
public/images/blog/covers/
- Add images to
public/images/gallery/ - Update
src/data/photos.tswith image metadata - Include title, category, date, and description
The site automatically deploys to GitHub Pages when you push to the main branch.
- Push changes to
mainbranch - GitHub Actions builds the site
- Generated files are deployed to
gh-pagesbranch - Site is live at
https://fyang0507.github.io
npm run buildThe built files will be in the docs/ directory.
- Modify
src/context/ThemeContext.tsxfor theme logic - Update Tailwind classes for color schemes
- Customize CSS variables in
src/index.css
- All styles use Tailwind CSS
- Custom components in
src/components/ - Global styles in
src/index.css
- Blog posts:
src/markdown/posts/ - Gallery images:
public/images/gallery/ - Site metadata: Update in component files
- Deployment Guide
- Blog Subtitles Guide
- Blog Year Filter Guide
- Cover Images Guide
- Gallery Features
- Gallery Performance Optimizations
- Gallery Randomization Guide
This project is open source and available under the MIT License.
- Live Site: https://fyang0507.github.io
- Repository: https://github.com/fyang0507/fyang0507.github.io