diff --git a/pages/_app.js b/pages/_app.js index 6bf73a76..bc03f2c1 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -17,16 +17,22 @@ import useAdjustStyle from '@/hooks/useAdjustStyle' // 各种扩展插件 这个要阻塞引入 import ExternalPlugins from '@/components/ExternalPlugins' -import { THEME } from '@/blog.config' import GlobalHead from '@/components/GlobalHead' +import { siteConfig } from '@/lib/config' +import BLOG from '@/blog.config' +/** + * App挂载DOM 入口文件 + * @param {*} param0 + * @returns + */ const MyApp = ({ Component, pageProps }) => { // 一些可能出现 bug 的样式,可以统一放入该钩子进行调整 useAdjustStyle(); const route = useRouter() const queryParam = useMemo(() => { - return getQueryParam(route.asPath, 'theme') || THEME + return getQueryParam(route.asPath, 'theme') || siteConfig('THEME', BLOG.THEME, pageProps.NOTION_CONFIG) }, [route]) // 整体布局