Skip to content

Commit 139bf39

Browse files
authored
Merge branch 'tangly1024:main' into martini
2 parents 4ca7d78 + 8332e97 commit 139bf39

File tree

148 files changed

+5321
-1237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5321
-1237
lines changed

.env.local

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
2-
NEXT_PUBLIC_VERSION=4.6.1
2+
NEXT_PUBLIC_VERSION=4.7.2
33

44

55
# 可在此添加环境变量,去掉最左边的(# )注释即可

.github/workflows/docker-ghcr.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ jobs:
2828

2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
3232

3333
- name: Set up Docker Buildx
34-
uses: docker/setup-buildx-action@v1
34+
uses: docker/setup-buildx-action@v3
3535

3636
# Login against a Docker registry except on PR
3737
# https://github.com/docker/login-action
3838
- name: Log into registry ${{ env.REGISTRY }}
3939
if: github.event_name != 'pull_request'
40-
uses: docker/login-action@v1
40+
uses: docker/login-action@v3
4141
with:
4242
registry: ${{ env.REGISTRY }}
4343
username: ${{ github.actor }}
@@ -47,14 +47,14 @@ jobs:
4747
# https://github.com/docker/metadata-action
4848
- name: Extract Docker metadata
4949
id: meta
50-
uses: docker/metadata-action@v3
50+
uses: docker/metadata-action@v5
5151
with:
5252
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5353

5454
# Build and push Docker image with Buildx (don't push on PR)
5555
# https://github.com/docker/build-push-action
5656
- name: Build and push Docker image
57-
uses: docker/build-push-action@v2
57+
uses: docker/build-push-action@v5
5858
with:
5959
context: .
6060
platforms: linux/amd64,linux/arm64

.github/workflows/pushUrl.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
runs-on: ubuntu-latest # 运行环境为最新版的Ubuntu
2525
steps:
2626
- name: 'Checkout codes' # 步骤一,获取仓库代码
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2828
# - name: 'Run baiduPush' # 步骤二,执行sh命令文件
2929
# run: npm install && npm run baiduPush # 运行目录是仓库根目录
3030
- name: Set up Python 3.8
31-
uses: actions/setup-python@v1
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: 3.8
3434

.github/workflows/sync.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
# Step 1: run a standard checkout action
1919
- name: Checkout target repo
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
# Step 2: run the sync action
2323
- name: Sync upstream changes

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ yarn-error.log*
4545
/public/robots.txt
4646
/public/sitemap.xml
4747
/public/rss/*
48-
48+
/sitemap.xml
4949

5050
# yarn
5151
package-lock.json

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ARG NOTION_PAGE_ID
2+
ARG NEXT_PUBLIC_THEME
3+
24
# Install dependencies only when needed
35
FROM node:18-alpine3.18 AS deps
46
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.

README.md

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 帮助教程
2+
3+
访问帮助:[NotionNext帮助手册](https://docs.tangly1024.com/)
4+
5+
> 本项目教程为免费、公开资源,仅限个人学习使用。严禁任何个人或组织将本教程用于商业用途,包括但不限于直接售卖、间接收费、或其他变相盈利行为。转载、复制或介绍本教程内容时,须保留作者信息并明确注明来源。
6+
> 本项目仅提供由作者团队授权的付费咨询服务,请注意辨别,谨防诈骗行为。任何未经授权的收费服务均可能存在法律风险。
7+
8+
Notion是一个能让效率暴涨的生产力引擎,可以帮你书写文档、管理笔记,搭建知识库,甚至可以为你规划项目、时间管理、组织团队、提高生产力、还有当前最强大的AI技术加持。
9+
> 如果希望进一步探索Notion的功能,欢迎购买《[Notion笔记从入门到精通进阶课程](https://docs.tangly1024.com/article/notion-tutorial)
10+
111
# NotionNext
212

313
<p>
@@ -25,26 +35,12 @@
2535

2636
## 预览效果
2737

28-
在线演示:[https://preview.tangly1024.com/](https://preview.tangly1024.com/)项目支持多主题切换,没找到喜欢的主题?[贡献](/CONTRIBUTING.md)一个吧~
38+
在线演示:[https://preview.tangly1024.com/](https://preview.tangly1024.com/)点击左下角挂件可以切换主题,没找到喜欢的主题?[贡献](/CONTRIBUTING.md)一个吧~
2939

3040
| Next | Medium | Hexo | Fukasawa |
3141
|--|--|--|--|
3242
| <img src='./docs/theme-next.png' width='300'/> [预览NEXT](https://preview.tangly1024.com/?theme=next) | <img src='./docs/theme-medium.png' width='300'/> [预览MEDIUM](https://preview.tangly1024.com/?theme=medium) | <img src='./docs/theme-hexo.png' width='300'/> [预览HEXO](https://preview.tangly1024.com/?theme=hexo) | <img src='./docs/theme-fukasawa.png' width='300'/> [预览FUKASAWA](https://preview.tangly1024.com/?theme=fukasawa) |
3343

34-
## 我要如何开始?
35-
36-
只需几分钟即可搭建您的个人站点:
37-
38-
- [部署教程 (支持多方案)](https://docs.tangly1024.com/)
39-
40-
- [配置手册 - (自定义插件)](https://docs.tangly1024.com/article/notion-next-guide)
41-
42-
- [二次开发 - (开发手册)](https://docs.tangly1024.com/article/notion-next-secondary-menu)
43-
44-
- [更新指南 - (升级您的代码)](https://docs.tangly1024.com/article/how-to-update-notionnext)
45-
46-
- [版本汇总 - (查询变动功能)](https://docs.tangly1024.com/article/notion-next-changelogs)
47-
4844
## 致谢
4945
感谢Craig Hart发起的Nobelium项目
5046

README_EN.md

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Free Installation and Usage Guide
2+
3+
Click here to access the help documentation: NotionNext Help Manual - (Completely Free)
4+
5+
## Rights Statement
6+
7+
This project's tutorial is a free and open resource intended solely for personal learning use. It is strictly prohibited for any individual or organization to use this tutorial for commercial purposes, including but not limited to direct sales, indirect charges, or any other forms of profit. When reproducing, copying, or sharing this tutorial, the author's information must be retained, and the source clearly cited.
8+
9+
This project only offers paid consultation services authorized by the author's team. Please be vigilant against fraud. Any unauthorized paid services may be subject to legal risks.
10+
11+
You can set up your personal website in just a few minutes. Here is the link to my free tutorial:
12+
113
# NotionNext
214

315
<p>
@@ -31,20 +43,6 @@ Live Demo:[https://preview.tangly1024.com/](https://preview.tangly1024.com/)
3143
|--|--|--|--|
3244
| <img src='./docs/theme-next.png' width='300'/> [NEXT](https://preview.tangly1024.com/?theme=next) | <img src='./docs/theme-medium.png' width='300'/> [MEDIUM](https://preview.tangly1024.com/?theme=medium) | <img src='./docs/theme-hexo.png' width='300'/> [HEXO](https://preview.tangly1024.com/?theme=hexo) | <img src='./docs/theme-fukasawa.png' width='300'/> [FUKASAWA](https://preview.tangly1024.com/?theme=fukasawa) |
3345

34-
## Get Start!
35-
36-
It only takes a few minutes to set up your personal site:
37-
38-
- [Quick Deployment Tutorial - Multiple Options Available](https://docs.tangly1024.com/article/vercel-deploy-notion-next)
39-
40-
- [Customization Guide - How to Configure Feature Plugins](https://docs.tangly1024.com/article/how-to-config-notion-next)
41-
42-
- [Development Guide - How to Conduct Local Development](https://docs.tangly1024.com/article/how-to-develop-with-notion-next)
43-
44-
- [Update Guide - How to Get the Latest Upgrade Patch](https://docs.tangly1024.com/article/how-to-update-notionnext)
45-
46-
- [Version History - Check Feature Highlights for Each Version](https://docs.tangly1024.com/article/latest)
47-
4846
## Acknowledgements
4947

5048
Special thanks to Craig Hart for initiating the Nobelium project.

blog.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ const BLOG = {
545545
process.env.ENABLE_CACHE ||
546546
process.env.npm_lifecycle_event === 'build' ||
547547
process.env.npm_lifecycle_event === 'export', // 在打包过程中默认开启缓存,开发或运行时开启此功能意义不大。
548-
isProd: process.env.VERCEL_ENV === 'production' || process.env.EXPORT, // 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)
548+
isProd: process.env.VERCEL_ENV === 'production' || process.env.EXPORT, // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables)
549549
BUNDLE_ANALYZER: process.env.ANALYZE === 'true' || false, // 是否展示编译依赖内容与大小
550550
VERSION: process.env.NEXT_PUBLIC_VERSION // 版本号
551551
}

components/Ackee.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ const Ackee = () => {
2424
},
2525
{
2626
/*
27-
* Enable or disable tracking of personal data.
28-
* We recommend to ask the user for permission before turning this option on.
29-
*/
27+
* Enable or disable tracking of personal data.
28+
* We recommend to ask the user for permission before turning this option on.
29+
*/
3030
detailed: true,
3131
/*
32-
* Enable or disable tracking when on localhost.
33-
*/
32+
* Enable or disable tracking when on localhost.
33+
*/
3434
ignoreLocalhost: false,
3535
/*
36-
* Enable or disable the tracking of your own visits.
37-
* This is enabled by default, but should be turned off when using a wildcard Access-Control-Allow-Origin header.
38-
* Some browsers strictly block third-party cookies. The option won't have an impact when this is the case.
39-
*/
36+
* Enable or disable the tracking of your own visits.
37+
* This is enabled by default, but should be turned off when using a wildcard Access-Control-Allow-Origin header.
38+
* Some browsers strictly block third-party cookies. The option won't have an impact when this is the case.
39+
*/
4040
ignoreOwnVisits: false
4141
}
4242
)

components/CustomContextMenu.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,14 @@ export default function CustomContextMenu(props) {
117117
function handleCopy() {
118118
const selectedText = document.getSelection().toString()
119119
if (selectedText) {
120-
const tempInput = document.createElement('input')
121-
tempInput.value = selectedText
122-
document.body.appendChild(tempInput)
123-
tempInput.select()
124-
document.execCommand('copy')
125-
document.body.removeChild(tempInput)
120+
const tempInput = document.createElement('input');
121+
tempInput.value = selectedText;
122+
document.body.appendChild(tempInput);
123+
tempInput.select();
124+
document.execCommand('copy');
125+
if (tempInput && tempInput.parentNode && tempInput.parentNode.contains(tempInput)) {
126+
tempInput.parentNode.removeChild(tempInput);
127+
}
126128
// alert("Text copied: " + selectedText);
127129
} else {
128130
// alert("Please select some text first.");

components/DarkModeButton.js

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useGlobal } from '@/lib/global'
2-
import { Moon, Sun } from './HeroIcons'
32
import { useImperativeHandle } from 'react'
3+
import { Moon, Sun } from './HeroIcons'
44

55
/**
66
* 深色模式按钮
77
*/
8-
const DarkModeButton = (props) => {
8+
const DarkModeButton = props => {
99
const { cRef, className } = props
1010
const { isDarkMode, toggleDarkMode } = useGlobal()
1111

@@ -20,8 +20,17 @@ const DarkModeButton = (props) => {
2020
}
2121
})
2222

23-
return <div onClick={toggleDarkMode} className={`${className || ''} flex justify-center dark:text-gray-200 text-gray-800`}>
24-
<div id='darkModeButton' className=' hover:scale-110 cursor-pointer transform duration-200 w-5 h-5'> {isDarkMode ? <Sun /> : <Moon />}</div>
23+
return (
24+
<div
25+
onClick={toggleDarkMode}
26+
className={`${className || ''} flex justify-center dark:text-gray-200 text-gray-800`}>
27+
<div
28+
id='darkModeButton'
29+
className=' hover:scale-110 cursor-pointer transform duration-200 w-5 h-5'>
30+
{' '}
31+
{isDarkMode ? <Sun /> : <Moon />}
32+
</div>
2533
</div>
34+
)
2635
}
2736
export default DarkModeButton

components/DifyChatbot.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export default function DifyChatbot() {
2424
return () => {
2525
// 在组件卸载时清理 script 标签
2626
const existingScript = document.getElementById(siteConfig('DIFY_CHATBOT_TOKEN')); // 注意调用 siteConfig()
27-
if (existingScript) document.body.removeChild(existingScript);
27+
if (existingScript && existingScript.parentNode && existingScript.parentNode.contains(existingScript)) {
28+
existingScript.parentNode.removeChild(existingScript);
29+
}
2830
};
2931
}, []); // 注意依赖数组为空,意味着脚本将仅在加载页面时执行一次
3032

0 commit comments

Comments
 (0)