+
1) ? post.page_cover : BLOG.defaultImgCover} alt={post.title} layout='fill' objectFit='cover' loading='lazy' />
diff --git a/components/ThirdPartyScript.js b/components/ThirdPartyScript.js
index 34d369a6..2e994a5c 100644
--- a/components/ThirdPartyScript.js
+++ b/components/ThirdPartyScript.js
@@ -35,11 +35,6 @@ const ThirdPartyScript = () => {
{/* 代码统计 */}
{BLOG.isProd && (<>
- {/* GoogleAdsense */}
- {BLOG.googleAdsenseId && (
-
- )}
{/* ackee统计脚本 */}
{BLOG.analytics.provider === 'ackee' && (
@@ -100,6 +95,40 @@ const ThirdPartyScript = () => {
}}
/>
>)}
+
+ {/* GoogleAdsense 广告植入 */}
+ {BLOG.googleAdsenseId && (
+ <>
+ {/* */}
+
+ {/* 信息流 */}
+
+ {/* 展示广告 */}
+
+ {/* 文章内嵌广告 */}
+
+
+ >
+ )}
>)}
>)
}
diff --git a/pages/_app.js b/pages/_app.js
index dec496ff..25dd8726 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -1,8 +1,9 @@
-import 'rc-dropdown/assets/index.css'
-import 'katex/dist/katex.min.css'
import 'animate.css'
-import '@/styles/notion.css'
import '@/styles/globals.css'
+import '@/styles/notion.css'
+import 'rc-dropdown/assets/index.css'
+import 'prismjs/themes/prism-okaidia.css'
+import 'katex/dist/katex.min.css'
import BLOG from 'blog.config'
import dynamic from 'next/dynamic'
import { GlobalContextProvider } from '@/lib/global'
diff --git a/pages/article/[slug].js b/pages/article/[slug].js
index 8356a5d0..622990a4 100644
--- a/pages/article/[slug].js
+++ b/pages/article/[slug].js
@@ -14,7 +14,6 @@ import Custom404 from '@/pages/404'
import Link from 'next/link'
import Image from 'next/image'
-import 'prismjs/themes/prism-okaidia.css'
import 'prismjs'
import 'prismjs/components/prism-bash'
import 'prismjs/components/prism-markup'
@@ -30,6 +29,10 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faEye, faFolderOpen } from '@fortawesome/free-solid-svg-icons'
import BlogAround from '@/components/BlogAround'
+import '@/styles/notion.css'
+import 'rc-dropdown/assets/index.css'
+import 'prismjs/themes/prism-okaidia.css'
+
const mapPageUrl = id => {
return 'https://www.notion.so/' + id.replace(/-/g, '')
}
@@ -152,7 +155,10 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, allPosts, categories
}
export async function getStaticPaths () {
- const posts = await getAllPosts({ from: 'slug - paths', includePage: true })
+ const posts = []
+ // if (BLOG.isProd) {
+ // posts = await getAllPosts({ from: 'slug - paths', includePage: true })
+ // }
return {
paths: posts.map(row => `${BLOG.path}/article/${row.slug}`),
fallback: true