diff --git a/blog.config.js b/blog.config.js index 4cd6807c..a2cfbf54 100644 --- a/blog.config.js +++ b/blog.config.js @@ -32,7 +32,9 @@ const BLOG = { }, gaConfig: { measurementId: 'G-5EV4HZD0XX' // e.g: G-XXXXXXXXXX - } + }, + baidyAnalytics: 'f683ef76f06bb187cbed5546f6f28f28', // e.g only need xxxxx -> https://hm.baidu.com/hm.js?xxxxx + busuanzi: true // see http://busuanzi.ibruce.info/ }, comment: { // support provider: gitalk, utterances, cusdis @@ -54,7 +56,8 @@ const BLOG = { repo: 'tangly1024/NotionNext' } }, - 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) + googleAdsense: true } // export default BLOG module.exports = BLOG diff --git a/components/DarkModeButton.js b/components/DarkModeButton.js index 889c8b88..3e330299 100644 --- a/components/DarkModeButton.js +++ b/components/DarkModeButton.js @@ -8,12 +8,10 @@ const DarkModeButton = () => { changeTheme(newTheme) localStorage.setItem('theme', newTheme) } - return
-
-
} export default DarkModeButton diff --git a/components/Footer.js b/components/Footer.js index 35ae7c86..c098a753 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -7,8 +7,8 @@ const Footer = ({ fullWidth = true }) => { const y = d.getFullYear() const from = +BLOG.since return ( -
@@ -16,7 +16,7 @@ const Footer = ({ fullWidth = true }) => {
{from === y || !from ? y : `${from} - ${y}`} {BLOG.author}
-
+ ) } diff --git a/components/Header.js b/components/Header.js index 768086ee..328ea275 100644 --- a/components/Header.js +++ b/components/Header.js @@ -49,6 +49,27 @@ const Header = ({ navBarTitle, fullWidth }) => { }, [sentinelRef]) return ( <> + { BLOG.autoCollapsedNavBar === true && ( + - )} - - {/* 统计脚本 */} - {BLOG.isProd && BLOG.analytics && BLOG.analytics.provider === 'ackee' && ( -