Logo和标题
左上角的 logo 和标题取自站点根目录的配置文件:
title: 网站名称
avatar: 头像
鼠标指上 subtitle 后翻转另一行字
logo:
subtitle: '' # '文字1 | 文字2' (鼠标放上去会切换到文字2)
背景配置
可以设置:纯色/渐变色/图片作为背景。
style:
leftbar:
background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)
blur-px: 100px # 模糊半径
blur-bg: var(--alpha60) # 模糊颜色 linear-gradient
关于linear-gradient的用法示例
/* 渐变轴为 45 度,从蓝色渐变到红色 */linear-gradient(45deg, blue, red);/* 从右下到左上、从蓝色渐变到红色 */linear-gradient(to left top, blue, red);/* 色标:从下到上,从蓝色开始渐变,到高度 40% 位置是绿色渐变开始,最后以红色结束 */linear-gradient(0deg, blue, green 40%, red);/* 颜色提示:从左到右的渐变,由红色开始,沿着渐变长度到 10% 的位置,然后在剩余的 90% 长度中变成蓝色 */linear-gradient(.25turn, red, 10%, blue);/* 多位置色标:45% 倾斜的渐变,左下半部分为红色,右下半部分为蓝色,中间有一条硬线,在这里渐变由红色转变为蓝色 */linear-gradient(45deg, red 0 50%, blue 50% 100%);主导航栏配置
自己可以增加任意的键值对,键:就是 menu_id,后面需要用到,值:就是显示的 md 链接,方括号内支持文字和图片标签
# 侧边栏主功能导航菜单
# 分类配置: 博客、wiki、杂谈、关于
menubar:
items:
- id: post
theme: '#1BCDFC'
title: 博客
icon: solar:documents-bold-duotone
url: /
- id: wiki
theme: '#3DC550'
title: wiki
icon: solar:documents-bold-duotone
url: /wiki/
- id: chitchat
theme: '#FA6400'
icon: solar:documents-bold-duotone
title: 杂谈
url: /chitchat/
- id: record
theme: '#F44336'
icon: solar:documents-bold-duotone
title: 关于
url: /record/
搜索
# 文章搜索
search:
service: local_search # local_search, todo...
local_search: # 在 front-matter 中设置 indexing:false 来避免被搜索索引
field: all # post, page, all
path: /search.json # 搜索文件存放位置
content: true # 是否搜索内容
codeblock: true # 是否搜索代码块(需要content: true)
可以在某些页面中通过覆盖 search 组件的 filter 参数来定制化搜索范围,例如 wiki 或 笔记 页面的配置中:
该 yml 需要写在对应的文件夹中
search:
filter: /wiki/stellar/
placeholder: 在 Stellar 中搜索...
自定义小组件
由于自定义小组件可以用于:【主题配置】、【项目配置】、【页面】,后者可以覆盖前者,所以自定义小组件单开一篇写
Footer(页脚)
footer:
social:
github:
icon: '<img src="/assets/placeholder/social/08a41b181ce68.svg"/>'
url: https://
music:
icon: '<img src="/assets/placeholder/social/3845874.svg"/>'
url: https://
unsplash:
icon: '<img src="/assets/placeholder/social/3616429.svg"/>'
url: https://
comments:
icon: '<img src="/assets/placeholder/social/942ebbf1a4b91.svg"/>'
url: https://