Updating Hexo and Icarus Theme to Latest Version

Updating Hexo and Icarus Theme to Latest Version

Recently, I decided to upgrade my blog system from Hexo 6.3.0 to the latest 7.3.0 version, along with updating the Icarus theme. In this article, I’ll share the entire update process, including the challenges encountered and their solutions.

Pre-Update Versions

  • Hexo Core Version: 6.3.0
  • Hexo CLI Version: 4.3.0
  • Icarus Theme Version: 5.1.0

Update Steps

1. Update Hexo CLI

First, we need to update Hexo CLI to the latest version:

1
npm install -g hexo-cli@latest

2. Update Hexo Core

Next, update the local Hexo core:

1
npm install hexo@latest --save

3. Fix Security Vulnerabilities

During the update process, several security vulnerabilities were detected and needed to be fixed:

1
2
npm audit fix
npm audit fix --force

4. Update Other Dependencies

Update other related dependencies:

1
npm update --save

5. Handle Styling Issues

We encountered a styling rendering issue related to bulma-stylus. Here’s how we resolved it:

  1. Remove bulma-stylus:
1
npm uninstall bulma-stylus
  1. Install bulma:
1
npm install bulma --save

6. Update Icarus Theme

Finally, update the Icarus theme to the latest version:

1
2
npm uninstall hexo-theme-icarus
npm install hexo-theme-icarus@latest --save

7. Regenerate the Site

After completing all updates, clean and regenerate the site:

1
2
hexo clean
hexo generate

Post-Update Versions

  • Hexo Core Version: 7.3.0
  • Hexo CLI Version: 4.3.2
  • Icarus Theme Version: Latest

Issues Encountered and Solutions

Issue 1: Style Rendering Error

During the update process, we encountered the following error:

1
2
ERROR Asset render failed: css/default.css
Error: Unexpected type inside the list.

This error was caused by version incompatibility between bulma-stylus and the new version of Hexo. We resolved it by removing bulma-stylus and installing bulma instead.

Issue 2: Security Vulnerabilities

During the update process, several security vulnerabilities were detected:

  • 2 Low-risk vulnerabilities
  • 8 Medium-risk vulnerabilities
  • 6 High-risk vulnerabilities
  • 2 Critical vulnerabilities

These were fixed by running npm audit fix and npm audit fix --force.

Conclusion

The update process went relatively smoothly overall. While we encountered some minor issues, they were all properly resolved. The updated blog system is now running more stably and has addressed known security vulnerabilities.

If you’re planning to update your Hexo blog, I recommend following these steps and ensuring you have backups of important data during the update process.

References

How to host a Hexo Blog on your Windows laptop with server

Since I recently learned about Nodejs, and I will probably focus on nodejs in the foreseeable future, I migrated my blog from Wordpress to Hexo.
Here is a little note about how to install a hexo blog.

Install VSCode

This part you need to do it yourself.

Install scoop

Scoop is a package manager on Windows. Highly suggested.

Type the following into PowerShell to ensure that local scripts are allowed to execute.

set-executionpolicy remotesigned -scope currentuser

Then install Scoop by executing the following command.

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

Just wait for the script to finish, and once it’s installed successfully, let’s try the following

scoop help

Finally install nodejs with scoop.

scoop install nodejs

Install hexo and git

Use npm to install hexo on your laptop:

npm install -g hexo-cli

Open the folder you want to store your blog data, then create a blog by using the following command:

hexo init [folder] // [folder] = your blog’s path

Open the project folder with VSCode:

npm install

Finally,

hexo s

Open your browser and localhost:4000 to see your website

Create a github repo

Follow the command provided by github:

Push your blog to Github

Every git-push process need the following three commands:

1
2
3
git add .
git commit -m "Your comment"
git push

You can open terminal on VSCode by clicking Ctrl+`

Host on Netlify for free

Well, I am lazy… and Netlify already did the job

To be continues…