This repository contains a migrated version of a WordPress blog, rebuilt as a Jekyll site and deployed on GitHub Pages.
- A static backup of blog posts originally written on WordPress
- A GitHub-hosted Jekyll website for long-term ownership and portability
- A source archive that can later be synced to tools like Obsidian
- GitHub Pages URL:
https://leo0331.github.io/wordpress/
my-site/: Jekyll source sitemy-site/_posts/: Migrated Markdown/HTML postsmy-site/assets/images/: Local image assets used by postsmy-site/import/: Original WordPress export XMLmy-site/scripts/wordpress_to_jekyll.rb: Migration + image-link rewrite script.github/workflows/deploy-pages.yml: GitHub Pages deployment workflow
Prerequisites:
- Ruby
3.4.1 - Bundler
2.6.2
Commands:
cd my-site
bundle install
bundle exec jekyll serveThen open: http://127.0.0.1:4000/wordpress/
Use the built-in migration script. You do not need to manually convert XML to Markdown.
cd my-site
bundle exec ruby scripts/wordpress_to_jekyll.rb \
--xml import/leo.WordPress.2026-04-23.xml \
--posts-dir _postsNotes:
- Existing post filename collisions are skipped (safe default).
- This means re-running the script will add new posts and keep existing files.
- If you edited a post on WordPress and want to refresh that same post file, remove that specific
_posts/YYYY-MM-DD-slug.mdand run the script again.
After adding or changing posts/categories, regenerate category pages and category index:
cd my-site
bundle exec ruby scripts/generate_category_pages.rbThis updates:
my-site/category/*.markdown(one page per category)my-site/categories.markdown(all categories index)