diff --git a/blog.config.js b/blog.config.js index 39e8336b..94b978ab 100644 --- a/blog.config.js +++ b/blog.config.js @@ -405,6 +405,7 @@ const BLOG = { DEBUG: process.env.NEXT_PUBLIC_DEBUG || false, // 是否显示调试按钮 ENABLE_CACHE: process.env.ENABLE_CACHE || process.env.npm_lifecycle_event === 'build', // 缓存在开发调试和打包过程中选择性开启,正式部署开启此功能意义不大。 isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production' // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) + BUNDLE_ANALYZER: process.env.ANALYZE === 'true' || true, // 编译时是否展示内容 VERSION: process.env.NEXT_PUBLIC_VERSION // 版本号 } diff --git a/components/AOSAnimation.js b/components/AOSAnimation.js new file mode 100644 index 00000000..c5dd4d92 --- /dev/null +++ b/components/AOSAnimation.js @@ -0,0 +1,12 @@ +import AOS from 'aos' +import { isBrowser } from 'react-notion-x' + +/** + * 加载滚动动画 + * https://michalsnik.github.io/aos/ + */ +export default function AOSAnimation() { + if (isBrowser) { + AOS.init() + } +} diff --git a/components/Equation.js b/components/Equation.js index 4872ad87..86685d62 100644 --- a/components/Equation.js +++ b/components/Equation.js @@ -8,8 +8,12 @@ const katexSettings = { strict: false } +/** + * 数学公式 + * @param {} param0 + * @returns + */ export const Equation = ({ block, math, inline = false, className, ...rest }) => { -// const { recordMap } = useNotionContext() math = math || getBlockTitle(block, null) if (!math) return null diff --git a/components/ExternalPlugins.js b/components/ExternalPlugins.js index 813025c0..5dd00db3 100644 --- a/components/ExternalPlugins.js +++ b/components/ExternalPlugins.js @@ -22,6 +22,8 @@ const VConsole = dynamic(() => import('@/components/VConsole'), { ssr: false }) const CustomContextMenu = dynamic(() => import('@/components/CustomContextMenu'), { ssr: false }) const DisableCopy = dynamic(() => import('@/components/DisableCopy'), { ssr: false }) const AdBlockDetect = dynamic(() => import('@/components/AdBlockDetect'), { ssr: false }) +const LoadingProgress = dynamic(() => import('@/components/LoadingProgress'), { ssr: false }) +const AosAnimation = dynamic(() => import('@/components/AosAnimation'), { ssr: false }) /** * 各种插件脚本 @@ -91,6 +93,8 @@ const ExternalPlugin = (props) => { {WEB_WHIZ_ENABLED && } {AD_WWADS_BLOCK_DETECT && } + + {CHATBASE_ID && (<>