音乐馆

了解如何配置 Solitude 主题的音乐馆页面。

配置页面

在 Hexo 博客根目录下打开终端,输入以下命令创建新页面

hexo new page music

创建数据文件

它将在博客目录的 source 文件夹下生成一个 music 文件夹,其中包含 index.md 文件。 接下来在里面加入页面 type 值。

参考(可按需修改):

index.md
---
title: music
date: 2025-07-13 23:24:50
comment: false
type: music
---

修改主题配置文件

你需要修改以下配置

音乐馆配置

如果你想启用音乐馆,这项必须修改,这里改为你自己的歌单,其他项根据你的需求自定义

_config.solitude.yml
# 大约在883行
# --------------------------- start ---------------------------
# Music Page
# 音乐馆
music:
  enable: true
  # 歌单 ID / 单曲 ID
  id: 5144842535
  # 服务商:netease / qq / xiami / kugou / baidu
  server: netease
  # 类型:playlist / song
  type: playlist
  # 默认音量
  volume: 0.8
  # 是否自动播放
  mutex: true
  # 播放方式:list / random
  order: list
# --------------------------- end ---------------------------

Meting API配置

正常使用可以不换,失效请替换自建或其他 Meting API

_config.solitude.yml
# 大约在584行
# --------------------------- 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 ---------------------------

音乐胶囊配置

这里是左下角音乐胶囊,可选开启,其他项根据你的需求自定义

_config.solitude.yml
# 大约在593行
# --------------------------- start ---------------------------
# Capsule music
# 音乐胶囊
capsule:
  enable: true
  # 歌单 ID / 单曲 ID
  id: 5144842535
  # 服务商:netease / qq / xiami / kugou / baidu
  server: netease
  # 类型:playlist / song
  type: playlist
  volume: 0.8
# --------------------------- end ---------------------------