Next 主题原生没有相册功能,我又是摄影爱好者,不得不下点功夫在这了。本系列介绍添加相册的方法,本文是开篇,记录Next主题下开启相册按钮和开启相应页面,后面的一边研究一边发。
Next设置
- 新建hexo page
hexo new page photos
将会在
source/
下创建photos/index.md
- 在index.md中添加
type: photos
title: photos
date: 2020-03-22 23:03:55
type: photos
- 修改
主题配置文件
,在menu
字段中加入photos: /photos/ || image
# 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.
# When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives).
# External url should start with http:// or https://
menu:
home: / || home
about: /about/ || user
tags: /tags/ || tags
categories: /categories/ || th
archives: /archives/ || archive
photos: /photos/ || image
#schedule: /schedule/ || calendar
sitemap: /sitemap.xml || sitemap
#commonweal: /404/ || heartbeat
- 修改 themes/next/languages/zh-Hans.yml,添加photos字段
menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
search: 搜索
commonweal: 公益404
something: 有料
sitemap: 站点地图
photos: 相册
- 此时效果