Skip to content

Commit cb07e2c

Browse files
committed
Merge branch 'main' of ssh://github.com/davidlu1001/NotionNext into main
2 parents af86b4e + c33ec22 commit cb07e2c

File tree

613 files changed

+32139
-12912
lines changed

Some content is hidden

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

613 files changed

+32139
-12912
lines changed

.env.local

+3-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.2.4
2+
NEXT_PUBLIC_VERSION=4.6.0
33

44

55
# 可在此添加环境变量,去掉最左边的(# )注释即可
@@ -62,6 +62,7 @@ NEXT_PUBLIC_VERSION=4.2.4
6262
# NEXT_PUBLIC_ALGOLIA_INDEX=
6363
# NEXT_PUBLIC_PREVIEW_CATEGORY_COUNT=
6464
# NEXT_PUBLIC_PREVIEW_TAG_COUNT=
65+
# NEXT_PUBLIC_POST_TITLE_ICON=
6566
# NEXT_PUBLIC_POST_DISABLE_GALLERY_CLICK=
6667
# NEXT_PUBLIC_FIREWORKS=
6768
# NEXT_PUBLIC_FIREWORKS_COLOR=
@@ -166,6 +167,7 @@ NEXT_PUBLIC_VERSION=4.2.4
166167
# NEXT_PUBLIC_NOTION_PROPERTY_TAGS=
167168
# NEXT_PUBLIC_NOTION_PROPERTY_ICON=
168169
# NEXT_PUBLIC_ENABLE_RSS=
170+
# NEXT_PUBLIC_IS_TAG_COLOR_DISTINGUISHED=
169171
# MAILCHIMP_LIST_ID=
170172
# MAILCHIMP_API_KEY=
171173
# NEXT_PUBLIC_DEBUG=

.eslintrc.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,15 @@ module.exports = {
44
es2021: true,
55
node: true
66
},
7-
extends: [
8-
'plugin:react/recommended',
9-
'plugin:@next/next/recommended',
10-
'standard'
11-
],
7+
extends: ['plugin:react/recommended', 'plugin:@next/next/recommended', 'standard', 'prettier'],
128
parserOptions: {
139
ecmaFeatures: {
1410
jsx: true
1511
},
1612
ecmaVersion: 12,
1713
sourceType: 'module'
1814
},
19-
plugins: [
20-
'react',
21-
'react-hooks'
22-
],
15+
plugins: ['react', 'react-hooks', 'prettier'],
2316
settings: {
2417
react: {
2518
version: 'detect'

.github/ISSUE_TEMPLATE/bug_report.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ assignees: tangly1024
1212
-->
1313

1414
**描述bug**
15-
【此项必填】简单说明bug的现象、相关的错误提示、日志等
16-
17-
**复现步骤**
18-
【此项必填】出现这个bug的操作步骤
15+
【此项必填】简单说明目前出现的现象、相关的错误提示、日志等、截图
1916

2017
**期望的正常结果**
21-
【此项必填】希望按这个步骤,正常操作结果是什么
18+
【此项必填】按这个步骤,预期出现的现象应该是什么
2219

23-
**截图**
24-
可选】相关的页面,应该的结果
20+
**复现步骤**
21+
此项必填】你的操作步骤,按此步骤理应在我的开发环境出现一样的bug。
2522

2623
**环境**
2724

@@ -32,4 +29,4 @@ assignees: tangly1024
3229
- 【可选】浏览器 [例如. chrome, safari, firefox]
3330

3431
**补充说明**
35-
【可选】与问题相关的其它说明
32+
【可选】与问题相关的其它说明

.github/workflows/codeql-analysis.yml

+39-22
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,72 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main ]
16+
branches: [ "main" ]
1717
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ main ]
18+
branches: [ "main" ]
2019
schedule:
21-
- cron: '21 5 * * 3'
20+
- cron: '22 13 * * 1'
2221

2322
jobs:
2423
analyze:
2524
name: Analyze
26-
runs-on: ubuntu-latest
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners
29+
# Consider using larger runners for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# only required for workflows in private repositories
37+
actions: read
38+
contents: read
2739

2840
strategy:
2941
fail-fast: false
3042
matrix:
31-
language: [ 'javascript' ]
32-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33-
# Learn more:
34-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
43+
language: [ 'javascript-typescript' ]
44+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
45+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
46+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
47+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3548

3649
steps:
3750
- name: Checkout repository
38-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
3952

4053
# Initializes the CodeQL tools for scanning.
4154
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
55+
uses: github/codeql-action/init@v3
4356
with:
4457
languages: ${{ matrix.language }}
4558
# If you wish to specify custom queries, you can do so here or in a config file.
4659
# By default, queries listed here will override any specified in a config file.
4760
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4961

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
62+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
63+
# queries: security-extended,security-and-quality
64+
65+
66+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
5167
# If this step fails, then you should remove it and run the build manually (see below)
5268
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
69+
uses: github/codeql-action/autobuild@v3
5470

5571
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
72+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
5773

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
74+
# If the Autobuild fails above, remove it and uncomment the following three lines.
75+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6176

62-
#- run: |
63-
# make bootstrap
64-
# make release
77+
# - run: |
78+
# echo "Run, Build Application using script"
79+
# ./location_of_script_within_repo/buildscript.sh
6580

6681
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
82+
uses: github/codeql-action/analyze@v3
83+
with:
84+
category: "/language:${{matrix.language}}"

.github/workflows/docker-ghcr.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- name: Checkout repository
3131
uses: actions/checkout@v2
3232

33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v1
35+
3336
# Login against a Docker registry except on PR
3437
# https://github.com/docker/login-action
3538
- name: Log into registry ${{ env.REGISTRY }}
@@ -54,6 +57,7 @@ jobs:
5457
uses: docker/build-push-action@v2
5558
with:
5659
context: .
60+
platforms: linux/amd64,linux/arm64
5761
push: ${{ github.event_name != 'pull_request' }}
5862
tags: ${{ steps.meta.outputs.tags }}
5963
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/sync.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Upstream Sync
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
schedule:
8+
- cron: "0 0 * * *" # every day
9+
workflow_dispatch:
10+
11+
jobs:
12+
sync_latest_from_upstream:
13+
name: Sync latest commits from upstream repo
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event.repository.fork }}
16+
17+
steps:
18+
# Step 1: run a standard checkout action
19+
- name: Checkout target repo
20+
uses: actions/checkout@v3
21+
22+
# Step 2: run the sync action
23+
- name: Sync upstream changes
24+
id: sync
25+
uses: aormsby/[email protected]
26+
with:
27+
upstream_sync_repo: tangly1024/NotionNext
28+
upstream_sync_branch: main
29+
target_sync_branch: main
30+
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
31+
32+
# Set test_mode true to run tests instead of the true action!!
33+
test_mode: false
34+
35+
- name: Sync check
36+
if: failure()
37+
run: |
38+
echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。
39+
exit 1

.prettierrc.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"singleQuote": true,
33
"semi": false,
44
"trailingComma": "none",
5-
"arrowParens": "avoid"
5+
"arrowParens": "avoid",
6+
"printWidth": 80,
7+
"bracketSpacing": true,
8+
"jsxSingleQuote": true,
9+
"jsxBracketSameLine": true
610
}

README_EN.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ Live Demo:[https://preview.tangly1024.com/](https://preview.tangly1024.com/)
3535

3636
It only takes a few minutes to set up your personal site:
3737

38-
- [Quick Deployment Tutorial - Multiple Options Available](https://tangly1024.com/article/notion-next)
38+
- [Quick Deployment Tutorial - Multiple Options Available](https://docs.tangly1024.com/article/vercel-deploy-notion-next)
3939

40-
- [Customization Guide - How to Configure Feature Plugins](https://tangly1024.com/article/notion-next-guide)
40+
- [Customization Guide - How to Configure Feature Plugins](https://docs.tangly1024.com/article/how-to-config-notion-next)
4141

42-
- [Development Guide - How to Conduct Local Development](https://tangly1024.com/article/how-to-develop-with-notion-next)
42+
- [Development Guide - How to Conduct Local Development](https://docs.tangly1024.com/article/how-to-develop-with-notion-next)
4343

44-
- [Update Guide - How to Get the Latest Upgrade Patch](https://tangly1024.com/article/how-to-update-notionnext)
44+
- [Update Guide - How to Get the Latest Upgrade Patch](https://docs.tangly1024.com/article/how-to-update-notionnext)
4545

46-
- [Version History - Check Feature Highlights for Each Version](https://tangly1024.com/article/notion-next-changelogs)
46+
- [Version History - Check Feature Highlights for Each Version](https://docs.tangly1024.com/article/latest)
4747

4848
## Acknowledgements
4949

0 commit comments

Comments
 (0)