yufan.me includes a music library that lets you embed audio tracks in posts using the APlayer music player. Tracks — both the MP3 file and the album cover — are stored in your S3 bucket and referenced from posts via PortableText. Lyrics are stored alongside each track in the database so the player never has to make a second network request to fetch them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/syhily/yufan.me/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
S3 storage must be enabled before you can add tracks. Go to Settings → Assets (/admin/settings/assets) and turn on Enable S3 uploads. This is the same toggle that gates image uploads — enabling it once covers both media types.
Audio files and cover art are stored in the same S3 bucket as images. The
assets.storage.enabled toggle in Settings → Assets controls all uploads. If images are already working, music uploads will work too.Music library structure
Each track in the library has the following shape:| Field | Description |
|---|---|
| Audio file | Stored at musics/<playerId>.mp3 |
| Cover image | 300 × 300 JPEG stored at musics/<playerId>.jpg |
| Title, artist, album | Text metadata displayed by the player |
| Lyrics | Stored in music.lyric — pre-loaded with the track to avoid a second round-trip |
| Source / Source ID | Currently netease (NetEase Cloud Music); (source, sourceId) is unique. source is reserved for future providers |
playerId is a 16-character lowercase alphanumeric nanoid generated at import time. PortableText blocks reference tracks by this ID.
Adding a track
- Go to Admin → Music Library and click New Track.
- Enter the track title, artist, and album.
- Upload the audio file (MP3) and cover art.
- Optionally paste a NetEase Cloud Music track ID — the service fetches metadata, the stream URL, and lyrics automatically via Meting.
- Save the track.
(source, sourceId) pair already exists in the library, saving returns the existing row without re-uploading — this makes bulk imports safe to re-run.
Embedding a track in a post
Two entry points in the Tiptap editor open the music picker:- Music Picker button in the top toolbar
/musicslash command in the body
musicPlayer PortableText block that references the track by its playerId. The block renders on the public site using APlayer with the per-track lyrics pre-loaded from the database.