关于如何搭建Github Pages博客我已经介绍了。
如果不了解的或者想了解博主所写的东西,可以来我看我得另一篇博客:如何使用Hexo建立自己的Github Pages博客
我这里以yilia为例为大家介绍主题的应用。
然后在网上找到自己喜欢的主题。我这里给大家推荐这个还是很不错的哦。
yilia预览:yilia
yilia代码库:yilia
Hexo官网的其他主题:Hexo
1.首先我们找到自己本地的Hexo文件夹下。
然后右键Git Bash Here
$ git clone https://github.com/litten/hexo-theme-yilia themes/yilia
通过以上命令我们把相应的主题下载到自己的hexo主题里边来。
2.修改配置文件
修改博客目录E:\hexo\_config.yml
中的theme属性,将其设置为yilia。
3.找到主题对应下边的配置文件,然后修改相应信息。
4.生成目录,在E:\hexo目录下运行
npm i hexo-generator-json-content --save
然后在主题下边的配置文件加入以下代码
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: true
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true
就可以正常的显示目录了。