Rookie

漫游指南-1 的世界

流浪在大理的斜杠青年

Hexo Environment Migration

Configure Basic Environment#

To configure the basic environment, you need to follow these steps:

  1. Install git and generate a key, saving it to your GitHub account.
  2. Download and install Node.js (with npm installed automatically).
  3. Use npm to install hexo, with the command npm install -g hexo-cli.

❗️ Note: After installing hexo, do not run hexo init.

The files that need to be migrated are:

  1. Blog configuration file ./_config.yml
  2. Theme configuration folder ./theme/
  3. Folder containing articles and related content ./source/
  4. Template folder ./scaffolds/
  5. File recording all plugins for the blog ./package.json

Redeploy on New Computer#

Do you remember the ./package.json you copied in the previous step? Just run the following command in the same directory:

npm install

This will automatically read the list of plugins recorded in the package.json file and install them one by one, so all the plugins you installed on the old device will be set up on the new device as well.

Everything else proceeds as usual: modify articles, generate static files, and deploy to git.

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