mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 15:10:37 +00:00
加快友情链接图片加载速度
This commit is contained in:
@@ -244,7 +244,7 @@ const BLOG = {
|
|||||||
// ********挂件组件相关********
|
// ********挂件组件相关********
|
||||||
// ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK
|
// ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK
|
||||||
|
|
||||||
COMMENT_HIDE_SINGLE_TAB: process.env.NEXT_PUBLIC_COMMENT_HIDE_SINGLE_TAB || false, //Whether hide the tab when there's no tabs. 只有一个评论组件时是否隐藏切换组件的标签页
|
COMMENT_HIDE_SINGLE_TAB: process.env.NEXT_PUBLIC_COMMENT_HIDE_SINGLE_TAB || false, // Whether hide the tab when there's no tabs. 只有一个评论组件时是否隐藏切换组件的标签页
|
||||||
|
|
||||||
// artalk 评论插件
|
// artalk 评论插件
|
||||||
COMMENT_ARTALK_SERVER: process.env.NEXT_PUBLIC_COMMENT_ARTALK_SERVER || '', // ArtalkServert后端地址 https://artalk.js.org/guide/deploy.html
|
COMMENT_ARTALK_SERVER: process.env.NEXT_PUBLIC_COMMENT_ARTALK_SERVER || '', // ArtalkServert后端地址 https://artalk.js.org/guide/deploy.html
|
||||||
@@ -353,7 +353,7 @@ const BLOG = {
|
|||||||
process.env.NEXT_PUBLIC_SEO_BAIDU_SITE_VERIFICATION || '', // Remove the value or replace it with your own google site verification code
|
process.env.NEXT_PUBLIC_SEO_BAIDU_SITE_VERIFICATION || '', // Remove the value or replace it with your own google site verification code
|
||||||
|
|
||||||
// 微软 Clarity 站点分析
|
// 微软 Clarity 站点分析
|
||||||
CLARITY_ID: process.env.NEXT_PUBLIC_CLARITY_ID || null , // 只需要复制Clarity脚本中的ID部分,ID是一个十位的英文数字组合
|
CLARITY_ID: process.env.NEXT_PUBLIC_CLARITY_ID || null, // 只需要复制Clarity脚本中的ID部分,ID是一个十位的英文数字组合
|
||||||
|
|
||||||
// <---- 站点统计
|
// <---- 站点统计
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import BLOG from '@/blog.config'
|
|||||||
* @param {*} value
|
* @param {*} value
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const mapImgUrl = (img, block, type = 'block', from) => {
|
const mapImgUrl = (img, block, type = 'block', from = 'post') => {
|
||||||
if (!img) {
|
if (!img) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -56,10 +56,10 @@ const mapImgUrl = (img, block, type = 'block', from) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文章封面压缩
|
console.log('block', block)
|
||||||
if (from === 'pageCoverThumbnail' || block.type === 'image') {
|
|
||||||
// 统一压缩图片
|
// 统一压缩图片
|
||||||
const width = block?.format?.block_width
|
if (from === 'pageCoverThumbnail' || block.type === 'image' || block.type === 'page') {
|
||||||
|
const width = block?.format?.block_width || 200
|
||||||
ret = compressImage(ret, width)
|
ret = compressImage(ret, width)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user