Hexo | yilia主题安装

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

遇到问题的解决

  1. 这个页面显示有问题
    在这里插入图片描述
  • 根目录执行命令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

后续添加主题功能

  • 添加字数与浏览统计
  • 添加评论
  • 添加背景音乐
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章