I just migrated my blog from Blogger to Github (via Hexo)! Because I'd like to use Markdown to write things efficiently (format, syntax highlight...), and think if I can finally integrate blog as part of my homepage (which soon or later will be hosted on github).
Migrate from blogger
To migrate from blogger, I use these instructions:
npm install -g hexo-cli
mkdir blog && cd blog
npm install --save hexo-migrator-rss
hexo migrate rss https://www.blogger.com/feeds/xxxxxxx/posts/default?max-results=600
xxxxxxx is your blog id which can be found from url bar of blogger's admin panel.
To test render result locally, run
hexo s --debug
To generate static file then update to github, run
hexo generate --deploy --debug
If you have amount of articles like me (about 500 articles), make sure you have allocate enough memory if you run the command in VM.
The template comes from hexo-theme-next with great document.
Github related configurations
Make sure you've follow "Setting up a custom subdomain" , and install
hexo-generator-cname to generate CNAME file for your static web site.
npm install --save hexo-generator-cname
cname property in
You can check _config.yml and themes/ for my site configurations.
The theme customization is done via npm scripts. You can check package.json::scripts for detail.
deploy automatically via travis CI
for step by step instructions. Or you can check My version of .travis.yml with hexo-theme-next gitsubmodule
Read 如何向 google 提交 sitemap (in chinese) to send sitemap.xml to google for better indexing.
git submodule foreach git pull origin master
to update your theme. Read Update Git submodule to latest commit on origin for more detail.