Create a blog by Hexo.
This article is made for self using in the future. Since I am an amatur and just want to own a personal blog.
All the actions in this article have been tried by me and are necessary and effective.
Thanks to the authors of the videos and articles cited in this article. All I did based on Hexo was from their sharings, especially Codesheep and 程序员茶社.
1. A holistic view of Hexo blog
Hexo itself made a very good introduction, and following with detail operations to guide the installation and using Hexo. Besides, the videos mentioned above and the article helped to install and initiate Hexo hand by hand.
In a word, Hexo is based on Node.js and git.
1). Download and install Git
2). Apply a Github account and using Git to generate and SSH keys to deploy works to Github.
3). Download and install Node.js by following the default instrcutions.
4). Download the Visual Studio Code in Microsoft store or the official website.
2. Installation of Node.js and Git
1). Install Node.js
You can find a lot of the very good instructions online to show you how to install Node.js, but all of them have the same characteristic which is asking you to follow the default instruction from Node.js
For the operation commands and troubleshooting guide of Node.js, see the related information on the official website
2). Install Git
The best way to install Git is always following the offical guide, it is easier when some good soul listed the detailed operations for reference.
To Git, the problem for rookies isn’t how to install it, but how to sign up for an account on Github, and global the accout with the SSH keys for the connection with Github.
Then the following codes are necessary after login the github account.
1 | $ git init |
Following the instructions by RUNOOB.COM to paste the SSH keys in “id_rsa.pub“ in Github “SSH and GPG KEYS” page. (It is easier to find files with Everything)
3. Install Hexo and Initation
Now, it’s time to use CMD command or GIT to create a Hexo blog by following the listed commands:
1). Install Hexo
1 | $ npm install -g hexo-cli |
2). Update the Hexo to the newest version
1 | $ npm update hexo -g |
Then there will be a folder named “Blog“, in it will be the listed folders:
4. Hexo operation commands
Only a few commands will be used usually:
1 | $ hexo clean |
The explanation for different letters are:
1 | { |
5. Hexo themes download and use
1). Search the fancy theme on Hexo official website.
2). Login the github.com to find the repository and download with GIT by the following code.
1 | $ git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia |
3). Open the _config.yml
by VS code and change the theme to yilia
, like below:
1 | theme: yilia |
4). In the deploy item of _config.yml
still under blog folder, make some changes as follows:
1 | deploy: |
6. Visual Studio Code
1). Find the training video from Bilibili
by 想变强的语汐.
2). Find the training video from Bilibili
by 偶尔有点小迷糊