Content Migration Made Easy: Migrating to Dav/Devs 2025 with GenAI
Learn how I streamlined content migration from various formats (Astro MD, Next.js MD) to Next.js with MDX using GitHub Copilot and a systematic workflow. A practical guide to automating content conversion with AI assistance.
·5 min read·Featured
By Davina Leong
I've been working on the latest version of my website — Dav/Devs 2025 — where I consolidated all my projects, articles, and microsites into a single platform. The goal was simple: make it less confusing for visitors and much easier for me to maintain and update.
One seemingly insignificant but very tedious part of this revamp was content migration.
The new site runs on Next.js with MDX, while my older projects were a mix of:
- Next.js with Markdown (MD)
- Astro with MD and React
Manually converting and rewriting everything would’ve been time-consuming and error-prone. That’s when Jesus gave me the idea to lean on GenAI / vibe coding to help with the migration.
Here’s the workflow I came up with.
🛠️ Tools & Prerequisites
- VS Code — main IDE
- GitHub Copilot — AI assistant for migration
- MDX template file — target structure for converted content
- Notepad++ — drafting and refining Copilot instructions
⚙️ Setup
-
Create a separate folder in
/appto hold files to be converted, e.g.:/app/_import(The underscore pushes it to the top of the directory for easy access.)
-
Inside
/app/_import, create an output folder:/app/_import/_outputThis is where the generated MDX files will go.
-
In
/public, create subdirectories for images based on post type:/public/articles /public/projects /public/…
🔄 Migration Process
-
Place all old
.mdor.mdxfiles into/app/_import. -
Copy all images into their respective
/publicsubdirectories. -
Open:
- One old Markdown file
- The MDX template file in VS Code side by side.
-
In Notepad++, map the old frontmatter and content structure to the new MDX template.
-
Write clear Copilot instructions in this format (with examples):
Goal: Migrate project MD files to MDX files
Instructions / Tasks / TODO:
- Example file:
<template-file-name> - File name format:
yyyymmdd-kebab-case-title.mdx subtitle→descriptiontech stack→ blockquote in content- Improve clarity and flow of content
- Update metadata to match template
- Output directory:
/_output
- Example file:
-
Send the instructions to Copilot and let it do its magic ✨ — while I reviewed the output as it was generated.
✅ Validation & Final Step
-
To verify completeness, I compared the file count between:
/app/_import/app/_import/_output
-
Once everything checked out, I moved the converted files into:
/content/<post-type>