1.下载主题资源
$
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
2.根目录的_config.yml文件进行配置
#更改你的名称
title: 没鱼的刺
subtitle: 行始于言
author: 没鱼的刺
language: zh-CN
#更改主题名称
theme: yilia
3.配置图片资源
- 添加图片资源文件夹。 路径为
themes/yilia/source/
下,可添加一个assets
文件夹,里面存放图片资源即可,配置文件中直接引用即可。 - 在路径
themes/yilia/_config.yml
下配置:
# SubNav
subnav:
github: "https://github.com/BigTigerTeeth/"
#你的头像url
avatar: /assets/img/Wechat.jpeg
遇到问题的解决
- 这个页面显示有问题
- 根目录执行命令
npm i hexo-generator-json-content --save
- 对根目录的_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
后续添加主题功能
- 添加字数与浏览统计
- 添加评论
- 添加背景音乐