Upgrade Blog Theme

Dec 11, 2021 · 1 min read · 212 Words · -Views -Comments

I stayed on Hexo 3.x for a long time because upgrading theme‑next was a hassle. RSS errors turned out to be version‑related, so I bit the bullet and upgraded to simplify future maintenance.

Here’s a brief description of the upgrade process:

Upgrade Hexo/NexT

  1. Delete the next folder, then download the new theme

    git clone https://github.com/theme-next/hexo-theme-next themes/next

  2. New NexT supports external config/custom styles outside the theme dir, making upgrades easier. Create next.yml and styles.styl in the project for customization.

    https://static.1991421.cn/2023/2023-06-03-133549.jpg

  3. The new theme supports the Gitalk comment system, so I switched from Disqus, which will improve loading speed and visitor experience.

Gitalk integration

Integration is simple:

  1. Visit GitHub to create an application
  2. Obtain the Client ID and Client Secret, then fill in these details along with the repository name and GitHub account in the configuration file
    • I pointed the repository to my blog for easier comment management

Notes

  1. Fill in the address/callback address with the online address
  2. The admin_user configuration allows administrators to directly create issues for the corresponding page when they visit
  3. The script will automatically create an issue and add the label gitalk and the ID

Final Thoughts

  1. Currently, the new version of hexo+theme seems to improve build efficiency
  2. The new configuration scheme supports custom folders, making future upgrades and maintenance easier
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover