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 | npm audit fix |
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:
- Remove
bulma-stylus
:
1 | npm uninstall bulma-stylus |
- Install
bulma
:
1 | npm install bulma --save |
6. Update Icarus Theme
Finally, update the Icarus theme to the latest version:
1 | npm uninstall hexo-theme-icarus |
7. Regenerate the Site
After completing all updates, clean and regenerate the site:
1 | hexo clean |
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 | ERROR Asset render failed: css/default.css |
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.