1. Create a personal repository for your blog

To create a new repository on Github, be careful when filling in the addressThis address is your domain name and ends with github. IOI’m registered here asmculover666.github.io:



Copy warehouse address:

2. Deploy Hexo to Github

Install the deployed command hexo-deployer-git first:

npm install hexo-deployer-git --save
Copy the code



Then open the site configuration file_config.yml, at the end of the modificationdeployValue:



Finally, Hexo is deployed:

hexo clan
hexo g
hexo d
Copy the code



Visit the domain name at this timemculover666.github.io(mculover666.github.io) you can see the home page:

3. Customize the domain name

3.1. Obtaining a personal domain name

First of all, you need to register an Ali Cloud account and buy a domain name on Ali Cloud:





Just choose one you like to buy, here I buy is:mculover666.cn.

Note: The purchase of domain name must wait for the completion of real-name authentication:

3.2. Set Domain name Resolution

Log in to ali Cloud console and set domain name resolution:



4.3. Set the custom domain name on Github

Go to the Github project Settings page and drop down to find the page Settings:





In the blog filesourceCreate a file named CNAME in the directory and write the custom domain name without the suffix:



Redeploy:

hexo clean
hexo g
hexo d
Copy the code

Wait a few minutes, open your browser and access the custom domain name. You can see the blog successfully constructed: