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

後續添加主題功能

  • 添加字數與瀏覽統計
  • 添加評論
  • 添加背景音樂
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章