Migrate an Existing Blog
Moving an existing blog from Hugo, Hexo, Jekyll, or another Astro theme to BlogGPT is straightforward because BlogGPT uses standard Markdown and YAML frontmatter. Follow the five steps below for a clean migration.
1. Organize Articles
Copy your existing .md or .mdx posts into content/posts/. You can keep them in a flat list or organize them into subfolders by year or topic—BlogGPT recursively scans content/posts/.
Next, check the frontmatter at the top of each post:
title(Required): Every post must have a stringtitle.- Required publication date: BlogGPT natively recognizes
date,published, orpubDatetimefor the publication date, andupdated,modDatetime, orlastmodfor the last modified date—so most Hugo, Hexo, and Astro posts work without renaming date fields. Every post must provide one of the supported publication date fields. draft: Setdraft: trueon unfinished posts.
2. Manage Assets
Depending on how your previous blog stored images and downloads, pick one of two approaches:
- Co-located assets (Content Bundles): If a post has its own folder containing
index.mdand images (just like Hugo Page Bundles), place the entire folder insidecontent/posts/<post-folder>/and reference files using relative paths (./image.png). See Bundles and Attachments. - Global static assets (
public/): If your posts reference root-relative paths like/images/cover.jpg, move your static folder intopublic/images/so/images/cover.jpgcontinues to resolve unchanged.
3. Categories and Tags
In BlogGPT, categories and tags are explicitly defined in content/categories/ and content/tags/ (or referenced by slug in post frontmatter):
- In your posts, ensure
categoriesandtagsuse clean slugs (for example,categories: [frontend]andtags: [astro, typescript]). Single strings (category: frontend) are also supported. - Create matching metadata files in
content/categories/<slug>.mdandcontent/tags/<slug>.mdto give each category or tag a human-readable display title, description, and optional cover image. See Categories, Tags, and Pages.
4. Preserve Existing URLs
If you want to keep your old post URLs intact so external links and search engine rankings don't break:
- Custom per-post slug: Set
slugin a post's frontmatter to override its filename. Slugs accept only lowercase ASCII letters, digits, and hyphens, starting with a letter or digit; an old path containing slashes cannot be used as a slug. - Date-based URL prefixes: If your old blog used URLs like
/posts/2026/my-postor/posts/2026/03/my-post, configureposts.pathPrefixinblog.config.ts(for example,pathPrefix: '[year]'orpathPrefix: '[year]/[month]'). See Structure and URLs.
5. Check and Publish
Run a full production build locally to validate all frontmatter schemas and internal links:
pnpm build
pnpm previewFix any schema validation warnings printed in the terminal, test a few migrated posts and images in your browser, and then deploy!