|
| 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