菜单栏
配置文件
NexT
提供了菜单栏配置,查询NexT _config.yml
# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
# Usage: `Key: /link/ || icon`
# Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive.
# Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon.
# External url should start with http:// or https://
menu:
#home: / || fa fa-home
#about: /about/ || fa fa-user
#tags: /tags/ || fa fa-tags
#categories: /categories/ || fa fa-th
#archives: /archives/ || fa fa-archive
#schedule: /schedule/ || fa fa-calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#commonweal: /404/ || fa fa-heartbeat
# Enable / Disable menu icons / item badges.
menu_settings:
icons: true
badges: false
对需要的菜单项取消注释,就可以在页面上看到相应选项,同时还需要对一些选项进行配置
- 点击
about
选项会读取/public/about/
路径下的index.html
文件 - 点击
tags
会读取/public/tags
下的index.html
文件,类别选项同理
默认情况下这几个路径下的index.html
文件为空,需要手动创建
icons & badges
默认设置icons
为true
,将会在菜单栏显示图标(图标内容通过|| home
、|| user
方式设置)
Usage: `Key: /link/ || icon`
如果设置badges
为true
,将会显示在菜单栏中显示对应数目,比如显示标签条目中的标签个数,存储条目中的文章数目
about页面
新建页面
hexo new page about
在source
文件夹下生成文件夹about
,其文件结构如下
.
├── index
└── index.md
1 directory, 1 file
修改index.md
文件的front-matter
,同时可以添加内容
---
title: 关于
date: 2019-01-23 23:30:47
tags: about
---
...
...
也可以手动在source
目录下建立相应文件夹以及相应文件
标签&类别
与about
选项操作类似,新建页面文件tags
和categories
,同时修改其.md
文件
# tags.md
---
title: 标签
date: 2019-01-23 23:26:43
type: tags
---
# categories.md
---
title: 类别
date: 2019-01-23 23:27:04
type: categories
---
注意 1:需要手动添加type: xxx
注意 2:需要手动设置中文title