Application Note #5 - Update Hexo

Objectives

  • update the static website (hexo)

References

  1. https://dandyxu.me/Hexo/How-to-update-Hexo-and-Hexo-theme-properly/

Procedures

Step 1

update hexo

  • Change into blog directory with package.json file
    • Run
      1
      npm update

Step 2

update hexo next theme

  • do nothing! Although the documentation… says to pull the repo, you dont have to npm update also updates the theme

  • package.json after update

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    "dependencies": {
    "hexo": "^5.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^2.0.0",
    "hexo-generator-searchdb": "^1.3.3",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^3.0.0",
    "hexo-renderer-stylus": "^2.0.0",
    "hexo-server": "^2.0.0",
    "hexo-symbols-count-time": "^0.7.1",
    "hexo-theme-next": "^8.1.0"
    }

Step 3

update hexo config

  • we configured hexo by using the alternate configuration file which required copying "node_modules/hexo-theme-next/_config.yml" to "_config.next.yml"
  • when we update “next” theme, you have to recopy that file (so you are working with the newest version of the config) but it wont have all of the config changes you made to it. You have to go in and remake all the changes (first, search for “_config.next.yml” to find all the places you modified the config, then make a backup copy of the working _config.next.yml, then copy the new one (see app note 4) and lastly reapply all the config changes)

back to Series…