Skip to content

Commit a9e196a

Browse files
authored
Merge pull request #6 from behitek/claude/redesign-portfolio-astro-011CV47FNfGfB9d9QbCWS9t9
Redesign blog portfolio with modern tech stack
2 parents 6c6fc74 + 44eee0f commit a9e196a

File tree

87 files changed

+16138
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+16138
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main, astro-main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build with Astro
34+
run: npm run build
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./dist
40+
41+
deploy:
42+
needs: build
43+
runs-on: ubuntu-latest
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

new-site/.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
dist/
6+
.astro/
7+
8+
# Environment
9+
.env
10+
.env.*
11+
!.env.example
12+
13+
# IDE
14+
.vscode/
15+
.idea/
16+
*.swp
17+
*.swo
18+
*~
19+
20+
# OS
21+
.DS_Store
22+
Thumbs.db
23+
24+
# Logs
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
pnpm-debug.log*
29+
lerna-debug.log*

new-site/.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
8+
"overrides": [
9+
{
10+
"files": "*.astro",
11+
"options": {
12+
"parser": "astro"
13+
}
14+
}
15+
]
16+
}

new-site/BLOG_MIGRATION_STATUS.md

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# Blog Post Migration Status
2+
3+
## ✅ Completed (2/10)
4+
1.**inverted-hyde.mdx** - Migrated (sample)
5+
2.**stop-using-requirements.mdx** - Migrated
6+
7+
## 📝 Remaining Blog Posts (8/10)
8+
9+
### Post Details for Migration
10+
11+
#### 1. flux-lora.md
12+
- **Title**: Fine-tuning Flux.1-dev LoRA on yourself
13+
- **Date**: 2024-11-17
14+
- **Category**: AI/ML
15+
- **Language**: en
16+
- **Tags**: ["Flux", "LoRA", "Text to Image"]
17+
- **Image**: /images/blog/flux-lora.png
18+
19+
#### 2. python-313-free-threaded.md
20+
- **Title**: Free Threaded Mode in Python3.13 (GIL disabled)
21+
- **Date**: 2024-10-10
22+
- **Category**: Python
23+
- **Language**: en
24+
- **Tags**: ["Python", "GIL"]
25+
- **Image**: /images/blog/python-313.png
26+
27+
#### 3. opensource-github-copilot.md
28+
- **Title**: Open-source AI code assistant Setup Guide
29+
- **Date**: 2024-10-08
30+
- **Category**: Tutorial
31+
- **Language**: en
32+
- **Tags**: ["Tool", "VSCode", "LLM"]
33+
- **Image**: /images/blog/continue-dev.png
34+
35+
#### 4. rag-in-production.md
36+
- **Title**: RAG In Production - Best Practices Notes
37+
- **Date**: 2024-07-18
38+
- **Category**: AI/ML
39+
- **Language**: en
40+
- **Tags**: ["RAG", "LLM", "production", "best-practices"]
41+
- **Image**: /images/blog/rag-in-production.png
42+
43+
#### 5. beam-search.md
44+
- **Title**: Beam search algorithm
45+
- **Date**: 2024-04-01
46+
- **Category**: AI/ML
47+
- **Language**: en
48+
- **Tags**: ["algorithm", "beam-search", "NLP"]
49+
- **Image**: /images/blog/beam-search.webp
50+
51+
#### 6. python-decorator.md
52+
- **Title**: Python Decorator
53+
- **Date**: 2024-03-09
54+
- **Category**: Python
55+
- **Language**: vi (Vietnamese)
56+
- **Tags**: ["python", "decorator", "tutorial"]
57+
- **Image**: /images/blog/python-decorator.jpeg
58+
59+
#### 7. bert-finetuned.md
60+
- **Title**: Fine-tuning BERT for the Sentence Pair Classification Task
61+
- **Date**: 2022-12-11
62+
- **Category**: AI/ML
63+
- **Language**: en
64+
- **Tags**: ["BERT", "NLP", "fine-tuning", "classification"]
65+
- **Image**: /images/blog/sentence-pair-classification.jpeg
66+
67+
#### 8. selenium-capture-http-request.md
68+
- **Title**: Capture HTTP request with Selenium like DevTools
69+
- **Date**: 2022-11-19
70+
- **Category**: Tutorial
71+
- **Language**: en
72+
- **Tags**: ["Selenium", "HTTP", "DevTools", "testing"]
73+
- **Image**: /images/blog/selenium-wire.png
74+
75+
---
76+
77+
## 🔧 Migration Template
78+
79+
For each post, use this format:
80+
81+
```markdown
82+
---
83+
title: "[TITLE FROM ABOVE]"
84+
description: "[DESCRIPTION FROM OLD POST]"
85+
date: [DATE FROM ABOVE]
86+
author: "Hieu Nguyen"
87+
language: "[en or vi]"
88+
category: "[CATEGORY FROM ABOVE]"
89+
tags: [TAGS FROM ABOVE]
90+
image: "[IMAGE FROM ABOVE]"
91+
draft: false
92+
---
93+
94+
[CONTENT - Remove frontmatter, remove <!--truncate-->, fix image paths]
95+
```
96+
97+
---
98+
99+
## 📋 Quick Migration Steps
100+
101+
### For Each Post:
102+
103+
1. **Read the original post**:
104+
```bash
105+
cat /home/user/behitek.github.io/blog/2024-11-17-flux-lora.md
106+
```
107+
108+
2. **Extract content** (skip frontmatter lines 1-8, remove truncate tag):
109+
```bash
110+
sed '1,8d' blog/FILE.md | sed 's|<!--truncate-->||g' | sed 's|/img/blog|/images/blog|g'
111+
```
112+
113+
3. **Create new MDX file** in:
114+
```
115+
/home/user/behitek.github.io/new-site/src/content/blog/[slug].mdx
116+
```
117+
118+
4. **Add proper frontmatter** using template above
119+
120+
5. **Paste content** below frontmatter
121+
122+
---
123+
124+
## 🚀 Bulk Migration Script
125+
126+
You can also use this command to help with extraction:
127+
128+
```bash
129+
#!/bin/bash
130+
cd /home/user/behitek.github.io
131+
132+
# For each remaining post
133+
for file in \
134+
"blog/2024-11-17-flux-lora.md:flux-lora:2024-11-17:en:AI/ML" \
135+
"blog/2024-10-10-python-313-free-threaded.md:python-313-free-threaded:2024-10-10:en:Python" \
136+
"blog/2024-10-08-opensource-github-copilot.md:opensource-github-copilot:2024-10-08:en:Tutorial" \
137+
"blog/2024-07-18-rag-in-production.md:rag-in-production:2024-07-18:en:AI/ML" \
138+
"blog/2024-04-01-beam-search.md:beam-search:2024-04-01:en:AI/ML" \
139+
"blog/2024-03-09-python-decorator.md:python-decorator:2024-03-09:vi:Python" \
140+
"blog/2022-12-11-bert-finetuned.md:bert-finetuned:2022-12-11:en:AI/ML" \
141+
"blog/2022-11-19-selenium-capture-http-request.md:selenium-capture-http-request:2022-11-19:en:Tutorial"
142+
do
143+
IFS=':' read -r filepath slug date lang category <<< "$file"
144+
echo "Processing: $filepath"
145+
146+
# Extract title
147+
title=$(grep "^title:" "$filepath" | sed 's/title: //' | sed 's/"//g')
148+
149+
# Extract description
150+
desc=$(grep "^description:" "$filepath" | sed 's/description: //' | sed 's/"//g')
151+
152+
# Extract tags
153+
tags=$(grep "^tags:" "$filepath" | sed 's/tags: \[//' | sed 's/\]//')
154+
155+
# Extract image
156+
image=$(grep "^image:" "$filepath" | sed 's/image: //' | sed 's|/img/blog|/images/blog|')
157+
158+
echo "Title: $title"
159+
echo "Slug: $slug"
160+
echo "Date: $date"
161+
echo "---"
162+
done
163+
```
164+
165+
---
166+
167+
## ⏱️ Estimated Time
168+
169+
- Per post migration: ~3-5 minutes
170+
- Total for 8 posts: ~30-40 minutes
171+
- Testing: ~10 minutes
172+
- **Total: ~50 minutes**
173+
174+
---
175+
176+
## ✅ After Migration Checklist
177+
178+
1. [ ] All 10 blog posts migrated
179+
2. [ ] Test locally: `cd new-site && npm run dev`
180+
3. [ ] Verify all posts show up on /blog
181+
4. [ ] Check language badges (EN/VI) display correctly
182+
5. [ ] Test filtering by language and category
183+
6. [ ] Verify images load correctly
184+
7. [ ] Check Vietnamese post (python-decorator) displays properly
185+
8. [ ] Test dark mode on all posts
186+
9. [ ] Commit and push all changes
187+
10. [ ] Create summary document
188+
189+
---
190+
191+
## 🎯 Next Actions
192+
193+
1. **Complete blog migration** (8 posts remaining)
194+
2. **Optional: Add code copy buttons** (30 min)
195+
3. **Configure Giscus** (10 min - requires GitHub Discussions setup)
196+
4. **Final testing** (20 min)
197+
5. **Deploy!** 🚀
198+
199+
---
200+
201+
**Current Progress: 20% Complete (2/10 posts migrated)**
202+
203+
**Note**: The site is already functional with 1 sample post. The remaining posts are just content migration - no code changes needed!

0 commit comments

Comments
 (0)