forked from tangly1024/NotionNext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tangly1024:main' into main
- Loading branch information
Showing
54 changed files
with
862 additions
and
612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,6 +185,11 @@ const BLOG = { | |
STARRY_SKY: process.env.NEXT_PUBLIC_STARRY_SKY || true, // 开关 | ||
|
||
// ********挂件组件相关******** | ||
// AI 文章摘要生成 @see https://docs_s.tianli0.top/ | ||
TianliGPT_CSS: process.env.NEXT_PUBLIC_TIANLI_GPT_CSS || 'https://cdn1.tianli0.top/gh/zhheo/[email protected]/tianli_gpt.css', | ||
TianliGPT_JS: process.env.NEXT_PUBLIC_TIANLI_GPT_JS || 'https://cdn1.tianli0.top/gh/zhheo/[email protected]/tianli_gpt.js', | ||
TianliGPT_KEY: process.env.NEXT_PUBLIC_TIANLI_GPT_KEY || '', | ||
|
||
// Chatbase 是否显示chatbase机器人 https://www.chatbase.co/ | ||
CHATBASE_ID: process.env.NEXT_PUBLIC_CHATBASE_ID || null, | ||
// WebwhizAI 机器人 @see https://github.com/webwhiz-ai/webwhiz | ||
|
@@ -239,6 +244,8 @@ const BLOG = { | |
// ********挂件组件相关******** | ||
// ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK | ||
|
||
COMMENT_HIDE_SINGLE_TAB: process.env.NEXT_PUBLIC_COMMENT_HIDE_SINGLE_TAB || false, //Whether hide the tab when there's no tabs. 只有一个评论组件时是否隐藏切换组件的标签页 | ||
|
||
// artalk 评论插件 | ||
COMMENT_ARTALK_SERVER: process.env.NEXT_PUBLIC_COMMENT_ARTALK_SERVER || '', // ArtalkServert后端地址 https://artalk.js.org/guide/deploy.html | ||
COMMENT_ARTALK_JS: process.env.NEXT_PUBLIC_COMMENT_ARTALK_JS || 'https://cdnjs.cloudflare.com/ajax/libs/artalk/2.5.5/Artalk.js', // ArtalkServert js cdn | ||
|
@@ -345,6 +352,9 @@ const BLOG = { | |
SEO_BAIDU_SITE_VERIFICATION: | ||
process.env.NEXT_PUBLIC_SEO_BAIDU_SITE_VERIFICATION || '', // Remove the value or replace it with your own google site verification code | ||
|
||
// 微软 Clarity 站点分析 | ||
CLARITY_ID: process.env.NEXT_PUBLIC_CLARITY_ID || null , // 只需要复制Clarity脚本中的ID部分,ID是一个十位的英文数字组合 | ||
|
||
// <---- 站点统计 | ||
|
||
// START---->营收相关 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-disable react/no-unknown-property */ | ||
|
||
import { siteConfig } from '@/lib/config' | ||
|
||
/** | ||
* 这里的css样式对全局生效 | ||
* 主题客制化css | ||
* @returns | ||
*/ | ||
const GlobalStyle = () => { | ||
// 从NotionConfig中读取样式 | ||
const GLOBAL_CSS = siteConfig('GLOBAL_CSS') | ||
return (<style jsx global>{` | ||
${GLOBAL_CSS} | ||
`}</style>) | ||
} | ||
|
||
export { GlobalStyle } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* eslint-disable no-unused-vars */ | ||
/* eslint-disable camelcase */ | ||
import { siteConfig } from '@/lib/config' | ||
import { loadExternalResource } from '@/lib/utils' | ||
import { useEffect } from 'react' | ||
/** | ||
* TianliGpt AI文章摘要生成工具 @see https://docs_s.tianli0.top/ | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
|
||
const TianLiGPT = () => { | ||
const tianliKey = siteConfig('TianliGPT_KEY') | ||
const tianliCss = siteConfig('TianliGPT_CSS') | ||
const tianliJs = siteConfig('TianliGPT_JS') | ||
|
||
useEffect(() => { | ||
initArtalk() | ||
}, []) | ||
|
||
if (!tianliKey) { | ||
return null | ||
} | ||
|
||
const initArtalk = async () => { | ||
console.log('loading tianliGPT', tianliKey, tianliCss, tianliJs) | ||
|
||
if (!tianliKey) { | ||
return | ||
} | ||
await loadExternalResource(tianliCss, 'css') | ||
|
||
window.tianliGPT_postSelector = '#notion-article'; | ||
window.tianliGPT_key = tianliKey; | ||
|
||
await loadExternalResource(tianliJs, 'js') | ||
} | ||
return <></> | ||
} | ||
|
||
export default TianLiGPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.