mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
Merge branch 'main' into feat/smartlink
This commit is contained in:
@@ -64,7 +64,7 @@ const Player = () => {
|
||||
<link
|
||||
rel='stylesheet'
|
||||
type='text/css'
|
||||
href='https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.css'
|
||||
href='https://cdn.jsdelivr.net/npm/aplayer@1.10.0/dist/APlayer.min.css'
|
||||
/>
|
||||
{meting ? (
|
||||
<meting-js
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = {
|
||||
MUSIC_PLAYER_LRC_TYPE: process.env.NEXT_PUBLIC_MUSIC_PLAYER_LRC_TYPE || '0', // 歌词显示类型,可选值: 3 | 1 | 0(0:禁用 lrc 歌词,1:lrc 格式的字符串,3:lrc 文件 url)(前提是有配置歌词路径,对 meting 无效)
|
||||
MUSIC_PLAYER_CDN_URL:
|
||||
process.env.NEXT_PUBLIC_MUSIC_PLAYER_CDN_URL ||
|
||||
'https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.js',
|
||||
'https://cdn.jsdelivr.net/npm/aplayer@1.10.0/dist/APlayer.min.js',
|
||||
MUSIC_PLAYER_ORDER: process.env.NEXT_PUBLIC_MUSIC_PLAYER_ORDER || 'list', // 默认播放方式,顺序 list,随机 random
|
||||
MUSIC_PLAYER_AUDIO_LIST: [
|
||||
// 示例音乐列表。除了以下配置外,还可配置歌词,具体配置项看此文档 https://aplayer.js.org/#/zh-Hans/
|
||||
|
||||
@@ -119,10 +119,19 @@ const compressImage = (image, width, quality = 50, fmt = 'webp') => {
|
||||
width = siteConfig('IMAGE_COMPRESS_WIDTH')
|
||||
}
|
||||
|
||||
// 将URL解析为一个对象
|
||||
const urlObj = new URL(image)
|
||||
// 获取URL参数
|
||||
const params = new URLSearchParams(urlObj.search)
|
||||
|
||||
let urlObj
|
||||
let params
|
||||
try {
|
||||
// 将URL解析为一个对象
|
||||
urlObj = new URL(image)
|
||||
// 获取URL参数
|
||||
params = new URLSearchParams(urlObj.search)
|
||||
} catch (err) {
|
||||
// 捕获异常并打印错误的url
|
||||
console.error('compressImage: Invalid URL:', image, err)
|
||||
return image
|
||||
}
|
||||
|
||||
// Notion图床
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user