1.将你原来电脑上已经配置好并生成的hexo目录拷到你的新电脑上,注意无需拷全部,只拷如下几个目录:
1 | _config.yml |
将这些目录放到一个目录下,如:hexo/
2.在你的新电脑上首先配置hexo环境:安装Node.js
3.安装hexo,执行命令:
1 | npm install -g hexo |
4.安装好之后,进入hexo/目录
5.模块安装,执行命令:
1 | npm install |
6.部署,执行命令:
1 | hexo g |
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true