Introduction#
In the previous article, we have completed the initialization of the Hexo blog. The next step is to make our blog visible on the public internet. Hexo blog is a purely static webpage, and it is not worth renting a server for it. Therefore, today's protagonist is Netlify. I chose Netlify because when setting up the blog, I saw a hexo-netlify-cms plugin that can be used as a backend for publishing articles.
1. Register a Netlify Platform Account and Create a Project#
- Go to the Netlify official website to register.
- It is recommended to register using a GitHub account.
- Import the project through a Git repository.
- Fill in the configuration. The build command for Hexo is
hexo g
, and the publish directory is./public
.
2. Enable Netlify Identity and Netlify CMS#
-
Open Site settings.
-
Enable Netlify Identity.
-
Choose "Invite only" as the registration method and save.
-
Enable Git Gateway.
-
The website should be deployed now. Let's take a look.
-
Next, let's check if the backend is working properly.
- First, invite users via email because we set it to "Invite only".
- Click on the "Identity" tab, invite users, and they will receive an email to register.
-
Enter your blog URL and add "/admin/" at the end to access the backend. Use the account you just registered to log in.
The backend looks like this
You can upload media resources.
By now, the basic setup of the blog is complete. Netlify provides us with a domain name, but you can also bind your own purchased domain name!