diff --git a/README.md b/README.md
index 5621da75..6e531429 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
访问帮助:[NotionNext帮助手册](https://docs.tangly1024.com/)
-> 本项目教程为免费、公开资源,仅限个人学习使用。严禁任何个人或组织将本教程用于商业用途,包括但不限于直接售卖、间接收费、或其他变相盈利行为。转载、复制或介绍本教程内容时,须保留作者信息并明确注明来源。
+> 本项目教程为免费、公开资源,仅限个人学习使用,禁止利用本教程建立的博客发布非法内容、进行违法犯罪活动。严禁任何个人或组织将本教程用于商业用途,包括但不限于直接售卖、间接收费、或其他变相盈利行为。转载、复制或介绍本教程内容时,须保留作者信息并明确注明来源。
> 本项目仅提供由作者团队授权的付费咨询服务,请注意辨别,谨防诈骗行为。任何未经授权的收费服务均可能存在法律风险。
Notion是一个能让效率暴涨的生产力引擎,可以帮你书写文档、管理笔记,搭建知识库,甚至可以为你规划项目、时间管理、组织团队、提高生产力、还有当前最强大的AI技术加持。
@@ -52,142 +52,9 @@ Notion是一个能让效率暴涨的生产力引擎,可以帮你书写文档
## 贡献者
-
+[](https://github.com/tangly1024/NotionNext/graphs/contributors)
## 引用技术
diff --git a/README_EN.md b/README_EN.md
index 488565ac..0e56f9a8 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -53,123 +53,9 @@ Special thanks to Craig Hart for initiating the Nobelium project.
## Contributors
-
+This project exists thanks to all the people who contribute.
+[](https://github.com/tangly1024/NotionNext/graphs/contributors)
## Technologies Used
diff --git a/components/ExternalPlugins.js b/components/ExternalPlugins.js
index 4e1f7072..fd92820e 100644
--- a/components/ExternalPlugins.js
+++ b/components/ExternalPlugins.js
@@ -10,6 +10,9 @@ import { initGoogleAdsense } from './GoogleAdsense'
import Head from 'next/head'
import ExternalScript from './ExternalScript'
import WebWhiz from './Webwhiz'
+import { useGlobal } from '@/lib/global'
+import IconFont from './IconFont'
+
/**
* 各种插件脚本
@@ -19,6 +22,7 @@ import WebWhiz from './Webwhiz'
const ExternalPlugin = props => {
// 读取自Notion的配置
const { NOTION_CONFIG } = props
+ const {lang} = useGlobal()
const DISABLE_PLUGIN = siteConfig('DISABLE_PLUGIN', null, NOTION_CONFIG)
const THEME_SWITCH = siteConfig('THEME_SWITCH', null, NOTION_CONFIG)
const DEBUG = siteConfig('DEBUG', null, NOTION_CONFIG)
@@ -124,6 +128,8 @@ const ExternalPlugin = props => {
NOTION_CONFIG
)
+ const ENABLE_ICON_FONT = siteConfig('ENABLE_ICON_FONT', false)
+
// 自定义样式css和js引入
if (isBrowser) {
// 初始化AOS动画
@@ -165,8 +171,8 @@ const ExternalPlugin = props => {
}
setTimeout(() => {
- // 将notion-id格式的url转成自定义slug
- convertInnerUrl(props?.allNavPages)
+ // 映射url
+ convertInnerUrl({ allPages:props?.allNavPages, lang:lang })
}, 500)
}, [router])
@@ -184,6 +190,7 @@ const ExternalPlugin = props => {
<>
{/* 全局样式嵌入 */}
+ {ENABLE_ICON_FONT && }
{MOUSE_FOLLOW && }
{THEME_SWITCH && }
{DEBUG && }
diff --git a/components/IconFont.js b/components/IconFont.js
new file mode 100644
index 00000000..a363eae8
--- /dev/null
+++ b/components/IconFont.js
@@ -0,0 +1,56 @@
+import { siteConfig } from '@/lib/config'
+import { loadExternalResource } from '@/lib/utils'
+import { useRouter } from 'next/router'
+import { useEffect } from 'react'
+
+/**
+ * iconfont
+ */
+export default function IconFont() {
+ const router = useRouter()
+
+ useEffect(() => {
+ loadExternalResource('/webfonts/iconfont.js')
+ .then(u => {
+ console.log('iconfont loaded');
+
+ // 查找所有 标签且 class 包含 'icon-'
+ const iElements = document.querySelectorAll('i[class*="icon-"]');
+ iElements.forEach(element => {
+ const className = Array.from(element.classList).find(cls => cls.startsWith('icon-'));
+ if (className) {
+ // 创建新的