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
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
The theme customization is done via npm scripts. You can check package.json::scripts for detail.
deploy automatically via travis CI
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.