WordPress to Github Pages Migration
Migration project, which was planned long ago, finally started on Feb 20, 2018. The reason to switch is too obvious to even think about it. The basic process consists of
-
Export my old WordPress site into markdown documents and download necessary images and videos: achieved by using Jekyll exporter
-
Create a local website with Jekyll: I need to sorted out the layout in ./_data/menu.yml (the so-called data-driven method) since my old site has a slightly complicated menu.
-
Create a repo based on the local site, and synced with github.
-
Tweak the local site and push to remote when it’s done.
It took me a while to decide how to export WordPress site. I even tried pelican to import wordpress xml export but found unsatisfying result. Eventually, I picked Jekyll exporter, and together with locally installed Jekyll, they did a great job to recover most of my pages and posts.
A few other things I have added:
-
Some preliminary layout and css format were borrowed and modified from Steve’s No-Good-Very-Bad theme.
-
Add google analytics to track the traffic and Twitter cards to show image previews of a post in a tweet.
To-Do:
-
tweak more of the outfit of the site
-
add comments functionality
-
implement categories and tags
-
fix the links in those imported pages/posts from old site