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
後續添加主題功能
- 添加字數與瀏覽統計
- 添加評論
- 添加背景音樂