banner
Cypress

Cypress

twitter
telegram
github
discord server

Building a Personal Blog with Hexo Part 2

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.

image

  • It is recommended to register using a GitHub account.

image

  • Import the project through a Git repository.

image

Select GitHub and a web page will pop up to choose the repository you want to authorizeimage

  • Fill in the configuration. The build command for Hexo is hexo g, and the publish directory is ./public.

image

2. Enable Netlify Identity and Netlify CMS#

  1. Open Site settings.
    image

  2. Enable Netlify Identity.
    image

  3. Choose "Invite only" as the registration method and save.
    image

  4. Enable Git Gateway.
    image

  5. The website should be deployed now. Let's take a look.

If "Published" appears, it means it's successful

  1. 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.
      image
  2. Enter your blog URL and add "/admin/" at the end to access the backend. Use the account you just registered to log in.
    image

The backend looks like thisimage

You can upload media resources.
image

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!
image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.