基础配置
了解如何配置 Solitude 主题的基本设置。
站点配置
修改网站各种资料,例如标题、副标题和邮箱等个人资料。
# Site
title: 伍拾柒 # 博客标题
subtitle: "" # 子标题
description: 小心翼翼的努力并拥有着。 # 博客简介
keywords: 伍拾柒 # 博客关键词
author: 伍拾柒 # 博主名称
language: zh-CN # 语言
timezone: Asia/Shanghai # 时区(请自行查询)
# Site Information
site:
name:
class: text # text / i_class / img
custom: Solitude # Solitude / fas fa-ghost / /img/pwa/favicon.ico
icon: /img/pwa/favicon.png # Site icon / 网站图标
导航菜单
# Navigation bar
# 导航栏
nav:
# Left Box
# 左侧盒子
group:
# project: # name
# Solitude: https://github.com/everfu/hexo-theme-solitude || /img/pwa/favicon.ico # name: url || icon
# Menu
# 菜单
menu:
# 首页: / # name: link
# 文库: # name
# 全部文章: /archives/ || fas fa-folder-closed # item name: link || icon
# 全部分类: /categories/ || fas fa-clone
# 全部标签: /tags/ || fas fa-tags
# 友链:
# 朋友圈: /moments/ || fas fa-wifi
# 友情链接: /links/ || fas fa-user-group
# 宝藏博主: javascript:travelling() || fas fa-gift
# 关于:
# 我的装备: /equipment/ || fas fa-laptop
# 在线工具: /tlink/ || fas fa-toolbox
# 音乐馆: /music/ || fas fa-music
# Right button
# 右侧按钮
right:
random: false # Random article / 随机文章按钮
custom:
# - name: 开往 # 名字
# url: https://www.travellings.cn/go.html # 跳转链接
# icon: fas fa-train # 图标
# onclick: # 点击事件
# id: travellings_button # id
# Left Box
# 左侧盒子
group:
项目: # name
Solitude: https://github.com/everfu/hexo-theme-solitude || /img/pwa/favicon.ico # name: url || icon
# Menu
menu:
首页: / # name: link
文库: # name
全部文章: /archives/ || fas fa-folder-closed # item name: link
全部分类: /categories/ || fas fa-clone
全部标签: /tags/ || fas fa-tags
友链:
朋友圈: /moments/ || fas fa-wifi
友情链接: /links/ || fas fa-user-group
宝藏博主: javascript:travelling() || fas fa-gift
关于:
我的装备: /equipment/ || fas fa-laptop
在线工具: /tlink/ || fas fa-toolbox
音乐馆: /music/ || fas fa-music
# Right button
# 右侧按钮
right:
random: false # Random article / 随机文章按钮
custom:
# - name: 开往 # 名字
# url: https://www.travellings.cn/go.html # 跳转链接
# icon: fas fa-train # 图标
# onclick: # 点击事件
# id: travellings_button # id
::
首页顶部
hometop:
enable: false
banner:
title: 分享技术<br >与科技生活 # 大字
desc:
一个热爱生活的人 # 小字
# - 我只是一个普通的程序员
# - 但我有一个不平凡的梦想
# - 我希望能够改变世界
icon:
# HTML: # name
# img: https://i.postimg.cc/vBWVnY8q/html.png # url
# color: "#e9572b" # color
# JS:
# img: https://i.postimg.cc/3N10Ltv2/js.png
# color: "#f7cb4f"
# Docker:
# img: https://i.postimg.cc/8Pk6Fg24/docker.png
# color: "#57b6e6"
# Flutter:
# img: https://i.postimg.cc/hPC7T3gB/flutter.png
# color: "#ffffff"
# WebPack:
# img: https://i.postimg.cc/dVLZBmtT/webpack.png
# color: "#2e3a41"
# Git:
# img: https://i.postimg.cc/nhgjwjCS/git.png
# color: "#df5b40"
group:
# 热门: /tags/Fire/ || fas fa-fire || linear-gradient(to right,#f65,#ffbf37)
recommendList:
enable: true
sup: 置顶
title: Solitude 官方文档
url: https://solitude.js.org/
img: /img/default.avif
color: "none"
设置最佳推荐信息,可以得到:
通过在文章的 Front Matter 中配置 recommend: true
,可以在首页顶部显示推荐列表。
recommendList:
enable: true
sup: 置顶
title: Solitude 官方文档
url: https://solitude.js.org/
img: /img/default.avif
color: "none"
hometop:
enable: false
banner:
title: 分享技术<br >与科技生活 # 大字
desc:
一个热爱生活的人 # 小字
# - 我只是一个普通的程序员
# - 但我有一个不平凡的梦想
# - 我希望能够改变世界
icon:
# HTML: # name
# img: https://i.postimg.cc/vBWVnY8q/html.png # url
# color: "#e9572b" # color
# JS:
# img: https://i.postimg.cc/3N10Ltv2/js.png
# color: "#f7cb4f"
# Docker:
# img: https://i.postimg.cc/8Pk6Fg24/docker.png
# color: "#57b6e6"
# Flutter:
# img: https://i.postimg.cc/hPC7T3gB/flutter.png
# color: "#ffffff"
# WebPack:
# img: https://i.postimg.cc/dVLZBmtT/webpack.png
# color: "#2e3a41"
# Git:
# img: https://i.postimg.cc/nhgjwjCS/git.png
# color: "#df5b40"
group:
热门: /tags/Fire/ || fas fa-fire || linear-gradient(to right,#f65,#ffbf37)
此部分存在在首页顶部横幅下方,显示热门标签。
group:
热门: /tags/Fire/ || fas fa-fire || linear-gradient(to right,#f65,#ffbf37)
侧边栏
# --------------------------- start ---------------------------
# Aside
# 侧边栏
aside:
# Values: about (info card), newestPost (latest article), allInfo (website information), newest_comment (latest comment)
# 值: about(信息卡), newestPost(最新文章), allInfo(网站信息), newest_comment(最新评论)
# Sticky: Fixed position / noSticky: Not fixed position
# Sticky: 固定位置 / noSticky: 不固定位置
home: # on the homepage
noSticky: "about"
Sticky: "allInfo"
post: # on the article page
noSticky: "about"
Sticky: "newestPost"
page: # on the page
noSticky: "about"
Sticky: "newestPost,allInfo"
# 菜单栏位置(0: 左 1: 右)
position: 1 # Sidebar positioning(0: left 1: right)
# --------------------------- start ---------------------------
# Information card
# 信息卡
my_card:
author:
img: /img/logo.png # url
sticker: # url, 24x24 size
# 介绍 / Introduction
description: 只有迎风,风筝才能飞得更高。
# 内容 / Content
content: # 这是我的博客 / This is my Blog
state:
morning: ✨ 早上好,新的一天开始了
noon: 🍲 午餐时间
afternoon: 🌞 下午好
night: 早点休息
goodnight: 晚安 😴
witty_words:
# - 你可以的
# - 你一定可以的
# - 祝你好运,陌生人
# social
# 社交信息图标
information:
# Github: https://github.com/everfu || fab fa-github # Name: link || icon
# Bilibili: https://space.bilibili.com/1329819902 || fab fa-bilibili
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# article table of contents
# 文章目录
toc:
post: true
page: false
vague: true
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# Tags
# 标签
tags:
enable: false
limit: 20 # Number of tags displayed
# Highlighted tags
highlight_list:
# - Hexo
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# Site Info
# 网站信息
siteinfo:
# Number of articles
# 文章数量
postcount: true
# Total number of words
# 总字数
wordcount: false
# PV
pv: true
# UV
uv: true
# Last update date
# 最后更新日期
updatetime: true
# Website creation time
# 网站创建时间
runtimeenable: true
# Format: yyyy-MM-dd hh-mm-ss
# 格式: yyyy-MM-dd hh-mm-ss
runtime: "2023-04-20 00:00:00"
# --------------------------- end ---------------------------
# --------------------------- end ---------------------------
此部分配置侧边栏属性,noSticky
表示不固定位置,Sticky
表示固定位置。
这部分还能自定义侧边栏内容,如作者信息卡、文章目录、标签云和网站信息等。position
用于设置侧边栏的位置,0 表示左侧,1 表示右侧。
# Sticky: Fixed position / noSticky: Not fixed position
# Sticky: 固定位置 / noSticky: 不固定位置
home: # on the homepage
noSticky: "about"
Sticky: "allInfo"
post: # on the article page
noSticky: "about"
Sticky: "newestPost"
page: # on the page
noSticky: "about"
Sticky: "newestPost,allInfo"
# 菜单栏位置(0: 左 1: 右)
position: 1 # Sidebar positioning(0: left 1: right)
# --------------------------- start ---------------------------
# Information card
# 信息卡
my_card:
author:
img: /img/logo.png # url
sticker: # url, 24x24 size
# 介绍 / Introduction
description: 只有迎风,风筝才能飞得更高。
# 内容 / Content
content: # 这是我的博客 / This is my Blog
state:
morning: ✨ 早上好,新的一天开始了
noon: 🍲 午餐时间
afternoon: 🌞 下午好
night: 早点休息
goodnight: 晚安 😴
witty_words:
# - 你可以的
# - 你一定可以的
# - 祝你好运,陌生人
# social
# 社交信息图标
information:
# Github: https://github.com/everfu || fab fa-github # Name: link || icon
# Bilibili: https://space.bilibili.com/1329819902 || fab fa-bilibili
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# article table of contents
# 文章目录
toc:
post: true
page: false
vague: true
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# Tags
# 标签
tags:
enable: false
limit: 20 # Number of tags displayed
# Highlighted tags
highlight_list:
# - Hexo
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# Site Info
# 网站信息
siteinfo:
# Number of articles
# 文章数量
postcount: true
# Total number of words
# 总字数
wordcount: false
# PV
pv: true
# UV
uv: true
# Last update date
# 最后更新日期
updatetime: true
# Website creation time
# 网站创建时间
runtimeenable: true
# Format: yyyy-MM-dd hh-mm-ss
# 格式: yyyy-MM-dd hh-mm-ss
runtime: "2023-04-20 00:00:00"
# --------------------------- end ---------------------------
页面配置
# --------------------------- start ---------------------------
# Page default settings
# 页面默认设置
page:
# 404 page
# 404 页面
error: true
# Tags page
# 标签页面
tags: true
# Categories page
# 分类页面
categories: true
# list: Sort List / 1: Follow HomeList
# list: 排序列表 / 1: 跟随首页列表
archives: 0
# Default value
# 默认值
default:
# Default image when no cover is set
# 未设置封面时的默认图片
cover:
# - /img/default.png # 默认图片 / default cover
# --------------------------- end ---------------------------
文章配置
# --------------------------- start ---------------------------
# Post default settings
# 文章默认设置
post:
default:
# Default image when no cover is set
# 未设置封面时的默认图片
cover:
# - # 默认图片 / default cover
# Location
# 位置
locate: China
# Copyright
# 版权
copyright:
enable: true
author: /img/logo.png # url
# License
# 许可证
license: CC BY-NC-SA 4.0
# License link
# 许可证链接
licenurl: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans
# Article Local AI
# 文章本地AI
ai:
enable: false
modelName: 小七 GPT
# Article meta information
# 文章元信息
meta:
# Release date
# 发布日期
date: false
# Update date
# 更新日期
updated: false
# Location
# 位置
locate: false
# Number of words
# 字数
wordcount: false
# uv
readtime: false
# pv
pv: false
# Comment count
# 评论数
comment: false
# Reward
# 打赏
award:
enable: false
appreciators: /about/ # Reward page
# Reward Title
# 打赏标题
title: # Thanks for your appreciation. / 感谢您的赞赏
desc: # Because of your support, I realize the value of writing articles. / 由于您的支持,我才能够实现写作的价值。
# Reward list
# 打赏列表
list:
# - name: Github Sponsor
# qcode: https://s3.qjqq.cn/47/661ba900c4bc1.webp!color
# url: https://github.com/sponsors/everfu
# color: var(--efu-black)
# Share icon
# 分享图标
share:
enable: false
list:
# - qq
# - weibo
# - twitter
# - facebook
# - telegram
# - whatsapp
# - linkedin
# - link
# - qrcode
rss: # /atom.xml
# Article reading progress
# 文章封面取色
covercolor:
enable: false
# local: local color / api: api color / ave: oss average color
mode: local
# api address / api 地址
api: https://api.qjqq.cn/api/Imgcolor?img=
# Storage / 缓存时间
time: 43200000
footer:
enable: false
desc: # Articles from Ever Fu. / 文章来自 Ever Fu # description
button: # Button
enable: true
name: # Learn more / 了解更多
url: /about/
# --------------------------- end ---------------------------
主题色
# --------------------------- start ---------------------------
# Custom Theme Color
theme_color:
dark: "#ffc848" # dark
light: "#425AEF" # light
# --------------------------- end ---------------------------
显示模式
# --------------------------- start ---------------------------
# display mode
# 显示模式
display_mode:
# auto: automatic switching(Recognize the current theme mode of the device) / dark: dark mode / light: light mode
# auto: 自动切换(识别设备当前主题模式) / dark: 深色模式 / light: 浅色模式
type: auto
# After opening, the dark mode will display the starry sky background
# 开启后深色模式会显示星空背景
universe: false
# --------------------------- end ---------------------------
字体配置
# --------------------------- start ---------------------------
# Font
# 字体
font:
font-size: 16px
code-font-size: 16px
# Global font
# 全局字体
font-family: "PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif"
# Code font
# 代码字体
code-font-family: '"monospace", monospace'
# --------------------------- end ---------------------------
背景图
# --------------------------- start ---------------------------
# Background
# 背景图片
background:
enable: false
opacity: .2
dark: https://i.pinimg.com/originals/d8/b3/9d/d8b39d12b653810db452c437211aeb2e.png
light: https://i.pinimg.com/originals/93/57/38/935738ed9657b296c2ef0ebd2151eb66.jpg
# --------------------------- end ---------------------------
欺骗点击
# --------------------------- start ---------------------------
# Lure
# When the user exits the page, modify the title
# 当用户退出页面时,修改标题
lure:
enable: false
jump: 404 Not Found
back: ヾ(≧∇≦*)ゝHey, hey, you fell for it.
# --------------------------- end ---------------------------
文章过期提醒
# --------------------------- start ---------------------------
# Article expiration
# 文章过期
expire:
enable: false
time: 30 # days
position: top # top / bottom
text_prev: "This article expired "
text_next: " day ago, if the content does not match, please contact the webmaster to update it."
# --------------------------- end ---------------------------
首页文章列表
# --------------------------- start ---------------------------
# Home page article configuration information
# 首页文章配置信息
index_post_list:
direction: column # row / column
column: 2 # 2: 2 columns 3: 3 columns
cover: both
# --------------------------- end ---------------------------
相关文章
# --------------------------- start ---------------------------
# Related articles
# 相关文章
related_post:
enable: false
limit: 2
# created: release date / updated: update date
# created: 发布日期 / updated: 更新日期
date_type: created
# --------------------------- end ---------------------------
右键菜单
# --------------------------- start ---------------------------
# Custom right menu
# 自定义右键菜单
right_menu:
enable: false
# Whether to display the hot comment switch.
# 是否显示热门评论开关
commentBarrage: false
# Whether to display the browser's context menu when hold Ctrl key.
# 是否在按住 Ctrl 键时显示浏览器右键菜单
ctrlOriginalMenu: false
# Simplified and Traditional Chinese translation.
# 简繁体转换
translate: false
# Custom list
# 自定义列表
custom_list:
# - name: 随机文章
# click: toRandomPost()
# id: menu-randomPost
# class:
# icon: fas fa-tower-broadcast
# - name: 全部分类
# click: pjax.loadUrl('/categories/') # External links with window.open, pjax can not request cross-domain content.
# id:
# class:
# icon: fas fa-clone
# - name: 全部标签
# click: pjax.loadUrl('/tags/')
# id:
# class:
# icon: fas fa-tags
# --------------------------- end -----------------------
翻译
# --------------------------- start ---------------------------
translate:
enable: true
defaultEncoding: 2 # 1: 默认繁体 2: 默认简体
translateDelay: 0 # 首次加载翻译迟疑时间
# --------------------------- end ---------------------------
复制
# --------------------------- start ---------------------------
# Copy
# information
# 复制信息
copy:
enable: false
# Turn on Link copyright information after copying.
# 复制后链接版权信息
copyright:
enable: false
# Display when the number of words copied exceeds
# 复制文字时超过多少字数显示
limit: 50
# --------------------------- end ---------------------------
控制台
# --------------------------- start ---------------------------
# Console
# 控制台
console:
enable: false
# Recent comments
# 最新评论
recentComment:
enable: false
# Cache time 1: 1 day / .5 : half a day
# 缓存时间 1: 1天 / .5 : 半天
storage: .2
card:
# Tags
# 标签
tags: true
# Archives
# 归档
archive: "month" # month: by month / year: by year
# --------------------------- end ---------------------------
404 页面
# --------------------------- start ---------------------------
# 404 page
# 404 页面
errorpage:
img: /img/404.avif
text: =awa= Page Not Found # Text
recommendList: true
# --------------------------- end ---------------------------
音乐
# --------------------------- start ---------------------------
# Meting API
# This part of the content uses metingjs,
# can only use NetEase Cloud Music, QQ Music and other music platforms supported by the mainland China region,
# the subsequent consideration of the use of JSON files to store music information and customize the implementation of the third-party API does not depend on the page.
# Music Page
meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r" # Custom API
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# Capsule music
# 音乐胶囊
capsule:
enable: false
# 歌单 ID / 单曲 ID
id: 5144842535
# 服务商:netease / qq / xiami / kugou / baidu
server: netease
# 类型:playlist / song
type: playlist
volume: 0.8
# --------------------------- end ---------------------------
无障碍
# --------------------------- start ---------------------------
# Quick Menu
# Open with shift + ?
# 快捷菜单
# 使用 shift + ? 打开
keyboard:
enable: false
list:
# - name: 关闭快捷菜单
# key: K
# func: keyboard
# - name: 打开控制台
# key: A
# sco: showConsole
# - name: 播放/暂停音乐
# key: M
# sco: musicToggle
# - name: 打开友链
# key: L
# url: /links/
# --------------------------- end ---------------------------
图片懒加载
# --------------------------- start ---------------------------
# Lazyload
# 图片懒加载
lazyload:
enable: false
# post, site
field: site
# 加载时替换图
placeholder: ""
# 加载失败替换图
errorimg: /img/error_load.avif
# --------------------------- end ---------------------------
加载动画
# --------------------------- start ---------------------------
# Loading
# 加载
loading:
# Full screen loading
# 全屏加载
fullpage: false
# Loading icon, default is siteicon
# 加载图标,不写默认siteicon
favicon: /img/favicon.png
# Pace loading
# Pace 加载
pace: true
# --------------------------- end ---------------------------
代码高亮
# --------------------------- start ---------------------------
# Highlight
# 代码块高亮
highlight:
enable: true
# Display the fold button when the number of words exceeds
# 当超过多少字时显示折叠按钮
limit: 200
# Whether to enable the copy button
# 是否启用复制按钮
copy: true
# Whether to expand by default
# 是否默认展开
expand: true
# default: default / mac : apple terminal
# default: 默认 / mac : 苹果终端
theme: mac
# default / solidity / dracula
color: default
# --------------------------- end ---------------------------
图片灯箱
# --------------------------- start ---------------------------
# Lightbox
# 图片灯箱
lightbox: false
# warning: Please select any one, but cannot be turned on at the same time.
# 警告: 请任选其一,但不能同时开启。
fancybox: false # fancybox
mediumZoom: false # mediumZoom
# --------------------------- end ---------------------------
Open Graph
# --------------------------- start ---------------------------
# OpenGraph
OpenGraph:
enable: false
options:
# twitter_card:
# twitter_image:
# twitter_id:
# twitter_site:
# google_plus:
# fb_admins:
# fb_app_id:
# --------------------------- end ---------------------------
网站灰色
# --------------------------- start ---------------------------
# Memorial
# Turn the entire site gray on memorable days.
# 在纪念日整个网站变灰
memorial:
enable: false
date:
# - 7-7
# - 9-18
# - 12-13
# --------------------------- end ---------------------------