found that node. js under Windows was easy to use and decided to migrate Hexo to Windows.
Direct copying is not advisable.
My approach is to copy the Hexo theme and source folder, and other content to be manually configured.
The premise of this article:
The system has node. js and Git installed.
All of the commands in this article are executed in Git Bash, not in CMD.
Git Shell is a better choice if you install GitHub for Windows.
Copy the required files
You need to copy the following folders:
hexo/source
hexo/themes/ 你的主题文件夹
and the following documents:
hexo/_config.yml
packge.json
Deploying a new Hexo in Windows
- Run the command in the folder where you want to deploy Hexo:
hexo init
, create a new Hexo directory.
- Copy the copied
packge.json
files to the new Hexo directory, overwriting the original files.
- Executes the
npm install
installation dependency package.
- Copy the remaining two folders and
_config.yml
to the corresponding location.
- Run the
hexo g
build blog.
- Run
hexo s -o
to view your blog.
PS. If open http://0.0.0.0:4000/
cannot be accessed, try openinghttp://localhost:4000/
Completed.
Migrating HEXO from Ubuntu to Windows