mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
@@ -1,5 +1,5 @@
|
||||
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
|
||||
NEXT_PUBLIC_VERSION=4.4.5
|
||||
NEXT_PUBLIC_VERSION=4.4.6
|
||||
|
||||
|
||||
# 可在此添加环境变量,去掉最左边的(# )注释即可
|
||||
|
||||
@@ -152,12 +152,16 @@ const ExternalPlugin = props => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
// 异步渲染谷歌广告
|
||||
if (ADSENSE_GOOGLE_ID) {
|
||||
setTimeout(() => {
|
||||
// 异步渲染谷歌广告
|
||||
initGoogleAdsense()
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
// 执行注入脚本
|
||||
// eslint-disable-next-line no-eval
|
||||
eval(GLOBAL_JS)
|
||||
}, [])
|
||||
|
||||
if (DISABLE_PLUGIN) {
|
||||
@@ -206,16 +210,6 @@ const ExternalPlugin = props => {
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* 注入JS脚本 */}
|
||||
{GLOBAL_JS && (
|
||||
<script
|
||||
async
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: GLOBAL_JS
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{CHATBASE_ID && (
|
||||
<>
|
||||
<script
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useEffect } from 'react'
|
||||
* @returns
|
||||
*/
|
||||
const GlobalHead = props => {
|
||||
const { children, siteInfo } = props
|
||||
const { children, siteInfo, post } = props
|
||||
let url = siteConfig('PATH')?.length
|
||||
? `${siteConfig('LINK')}/${siteConfig('SUB_PATH', '')}`
|
||||
: siteConfig('LINK')
|
||||
@@ -25,12 +25,17 @@ const GlobalHead = props => {
|
||||
const title = meta?.title || siteConfig('TITLE')
|
||||
const description = meta?.description || `${siteInfo?.description}`
|
||||
const type = meta?.type || 'website'
|
||||
const keywords = meta?.tags || siteConfig('KEYWORDS')
|
||||
const lang = siteConfig('LANG').replace('-', '_') // Facebook OpenGraph 要 zh_CN 這樣的格式才抓得到語言
|
||||
const category = meta?.category || siteConfig('KEYWORDS') // section 主要是像是 category 這樣的分類,Facebook 用這個來抓連結的分類
|
||||
const favicon = siteConfig('BLOG_FAVICON')
|
||||
const webFontUrl = siteConfig('FONT_URL')
|
||||
|
||||
// SEO关键词
|
||||
let keywords = meta?.tags || siteConfig('KEYWORDS')
|
||||
if (post?.tags && post?.tags?.length > 0) {
|
||||
keywords = post?.tags?.join(',')
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
// 使用WebFontLoader字体加载
|
||||
loadExternalResource(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "notion-next",
|
||||
"version": "4.4.5",
|
||||
"version": "4.4.6",
|
||||
"homepage": "https://github.com/tangly1024/NotionNext.git",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user