hexo-GitHub个人主页更换主题
序言
上一篇博客我为大家介绍了如何使用hexo+GitHub搭建个人博客,本片我将记录我如何更换hexo的主题matery。
主题的下载与切换
下载
hexo主题的官网:https://hexo.io/themes/
matery主题官网:https://github.com/blinkfox/hexo-theme-matery
可以在官网的release里面下载,也可以使用git clone https://github.com/blinkfox/hexo-theme-matery.git
下载,将下载的文件夹放到博客文件夹下的themes下。
切换
在博客文件夹下,打开_config.yml
文件,将theme
设置为你的主题名字。
主题的配置
增加页面
增加tags标签页、categories分类页、about关于我页面、contact留言板页。
新建分类 categories 页
categories
页是用来展示所有分类的页面,如果在你的博客 source
目录下还没有 categories/index.md
文件,那么你就需要新建一个,命令如下:
hexo new page "categories"
编辑你刚刚新建的页面文件 /source/categories/index.md
,至少需要以下内容:
---
title: categories
date: 2021-06-8 17:25:30
type: "categories"
layout: "categories"
---
新建标签 tags 页
tags
页是用来展示所有标签的页面,如果在你的博客 source
目录下还没有 tags/index.md
文件,那么你就需要新建一个,命令如下:
hexo new page "tags"
编辑你刚刚新建的页面文件 /source/tags/index.md
,至少需要以下内容:
---
title