在[Hexo+Next]
主題下新增一個資源分類頁面。
新建一個頁面,命名為resources
。
hexo new page "resources"
此時會在hexo > source文件夾中會生成一個resources文件夾。
編輯resources文件夾下的md
頁面
將類型設置為resources
,主題將自動為這個頁面顯示所有分類。
title: 常用工具
date: 2017-12-14 13:05:38
type: "resources"
---
注意:如果有啟用多說或者Disqus評論,默認頁面也會帶有評論。需要關閉的話,請添加字段comments
并將值設置為false
,如:
title: 常用工具
date: 2017-12-14 13:05:38
type: "resources"
comments: false
---
在菜單中添加鏈接
編輯主題的_config.yml
,在menu
中的添加如下:
menu:
resources: /resources || download
||
之前的值是目標鏈接,之后的是分類頁面的圖標,圖標名稱來自于FontAwesome icon。若沒有配置圖標,默認會使用問號圖標。
新添加的菜單需要翻譯對應的中文
打開hexo>theme>next>languages>zh-Hans.yml
,在menu下添加:
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標簽
about: 關于
search: 搜索
schedule: 日程表
sitemap: 站點地圖
commonweal: 公益404
resources: 資源
如果覺得有用,歡迎關注我的微信,有問題可以直接交流:

你的關注是對我最大的鼓勵!