Creating Chinese and English Blogs with Hexo
Since joining Amazon, I have had more exposure to English and foreign colleagues. The need to practice using English has grown stronger. Also, to connect more with the international world, I decided to create my own English blog.
Steps
Use the Chinese blog as a template and create an English blog.
1 | cp -r Hexo HexoEn |
Delete the unused Chinese posts and resources from HexoEn.
Create a new repo on GitHub: “en”.
Modify the HexoEn _config.yml configuration file. Note that the deployment branch is gh-pages, GitHub’s default Pages branch. If yours is different, you need to go to the repo’s Setting->Pages and configure your custom branch:
1 | language: |
The Chinese Hexo _config.yml configuration file:
1 | language: |
This way, the Chinese and English blogs can link to each other from the menu.
Deploy the blog and see how it looks.
1 | hexo generate -d |
Push HexoEn to the remote as well for backup and synchronization. Note that this uses the same repo as deploy, but a different branch.
1 | git remote remove origin |
Final Result
Chinese blog: https://youngforest.github.io
English blog: https://youngforest.github.io/en/