Skip to content

Commit a4ce0d3

Browse files
committed
first commit
0 parents  commit a4ce0d3

File tree

149 files changed

+10484
-0
lines changed

Some content is hidden

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

149 files changed

+10484
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.next*

.env.local

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
2+
NEXT_PUBLIC_VERSION=3.13.3

.eslintrc.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true
6+
},
7+
extends: [
8+
'plugin:react/recommended',
9+
'plugin:@next/next/recommended',
10+
'standard'
11+
],
12+
parserOptions: {
13+
ecmaFeatures: {
14+
jsx: true
15+
},
16+
ecmaVersion: 12,
17+
sourceType: 'module'
18+
},
19+
plugins: [
20+
'react',
21+
'react-hooks'
22+
],
23+
settings: {
24+
react: {
25+
version: 'detect'
26+
}
27+
},
28+
rules: {
29+
'react/prop-types': 'off',
30+
'space-before-function-paren': 0,
31+
'react-hooks/rules-of-hooks': 'error' // Checks rules of Hooks
32+
},
33+
globals: {
34+
React: true
35+
}
36+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report (Bug反馈)
3+
about: 报告一个软件的BUG来让NotionNext变得更好
4+
title: ''
5+
labels: bug
6+
assignees: tangly1024
7+
---
8+
9+
<!--
10+
!!! 重要 !!!
11+
请遵守这个模板的格式填写,否则你的Issue将被关闭
12+
-->
13+
14+
**描述bug**
15+
简单说明bug的现象、相关的错误提示、日志等
16+
17+
**复现步骤**
18+
出现这个bug的操作步骤
19+
20+
**期望的正常结果**
21+
希望按这个步骤,正常操作结果是什么
22+
23+
**截图**
24+
相关的页面,应该用结果
25+
26+
**环境**
27+
28+
- 操作系统: [例如. iOS, Android, macOS, windows]
29+
- 浏览器 [例如. chrome, safari, firefox]
30+
- 版本 [e.g. 22]
31+
32+
**补充说明**
33+
与问题相关的其它说明

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Join Notion CN Community
4+
url: https://t.me/Notionso
5+
about: Ask and discuss Notion and Nobelium with other community members.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Deployment error (部署错误)
3+
about: 在安装部署NotionNext时需要什么帮助吗
4+
title: ''
5+
labels: deployment
6+
assignees: tangly1024
7+
---
8+
9+
10+
<!--
11+
!!! 重要 !!!
12+
请遵守这个模板的格式填写,否则你的Issue将被关闭
13+
-->
14+
15+
**描述遇到的问题**
16+
简单说明你遇到的问题,相关的日志、错误信息
17+
18+
**相应配置**
19+
相关的配置,例如notion_page_id;你的网站地址
20+
21+
**截图**
22+
相关的页面,应该用结果
23+
24+
**环境**
25+
26+
- 操作系统: [例如. iOS, Android, macOS, windows]
27+
- 浏览器 [例如. chrome, safari, firefox]
28+
- 版本 [e.g. 22]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request (新特性建议)
3+
about: Suggest an idea for Nobelium.
4+
title: ''
5+
labels: enhancement
6+
assignees: tangly1024
7+
---
8+
9+
<!--
10+
!!! 重要 !!!
11+
请遵守这个模板的格式填写,否则你的Issue将被关闭
12+
-->
13+
14+
**为什么提出这个新的特性改动**
15+
简要说明此特性解决的问题,例如,『博客站点的读者互动性不够强,和读者无法建立紧密的联系...』
16+
17+
**描述一下你推荐的解决方案**
18+
简要说明你的解决方案建议,例如,『Giscus评论插件功能更加强大,用户只需留言既可在你的邮箱收到通知。。。』
19+
20+
**描述一下你考虑过的其它替代解决方案**
21+
简要说明你所有想过的有可能解决此问题的方案。
22+
23+
**补充说明**
24+
补充与此特性相关的内容

.github/stale.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 7
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 3
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs.
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: false

.github/workflows/codeql-analysis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '21 5 * * 3'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
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
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# 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
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
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
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

.github/workflows/docker-ghcr.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Docker ghcr.io
2+
3+
# This workflow uses actions that are not certified by GitHub.
4+
# They are provided by a third-party and are governed by
5+
# separate terms of service, privacy policy, and support
6+
# documentation.
7+
8+
on:
9+
push:
10+
branches: [main]
11+
# Publish semver tags as releases.
12+
tags: ["v*.*.*"]
13+
pull_request:
14+
branches: [main]
15+
16+
env:
17+
# Use docker.io for Docker Hub if empty
18+
REGISTRY: ghcr.io
19+
# github.repository as <account>/<repo>
20+
IMAGE_NAME: ${{ github.repository }}
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
packages: write
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v2
32+
33+
# Login against a Docker registry except on PR
34+
# https://github.com/docker/login-action
35+
- name: Log into registry ${{ env.REGISTRY }}
36+
if: github.event_name != 'pull_request'
37+
uses: docker/login-action@v1
38+
with:
39+
registry: ${{ env.REGISTRY }}
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
# Extract metadata (tags, labels) for Docker
44+
# https://github.com/docker/metadata-action
45+
- name: Extract Docker metadata
46+
id: meta
47+
uses: docker/metadata-action@v3
48+
with:
49+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
50+
51+
# Build and push Docker image with Buildx (don't push on PR)
52+
# https://github.com/docker/build-push-action
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: .
57+
push: ${{ github.event_name != 'pull_request' }}
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
# .env.local # 版本号放在此环境变量中
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel
35+
36+
# dev
37+
/data.json
38+
/yarn.lock
39+
/pnpm-lock.yaml
40+
.idea
41+
.vscode
42+
43+
44+
# sitemap
45+
/public/robots.txt
46+
/public/sitemap.xml
47+
/public/rss/*

.prettierignore

Whitespace-only changes.

.prettierrc.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* .prettierrc.js
3+
* 在VSCode中安装prettier插件 打开插件配置填写`.prettierrc.js` 将本文件作为其代码格式化规范
4+
* 在本文件中修改格式化规则,不会同时触发改变ESLint代码检查,所以每次修改本文件需要重启VSCode,ESLint检查才能同步代码格式化
5+
* 需要相应的代码格式化规范请自行查阅配置,下面为默认项目配置
6+
*/
7+
module.exports = {
8+
// 一行最多多少个字符
9+
printWidth: 150,
10+
// 指定每个缩进级别的空格数
11+
tabWidth: 2,
12+
// 使用制表符而不是空格缩进行
13+
useTabs: true,
14+
// 在语句末尾是否需要分号
15+
semi: true,
16+
// 是否使用单引号
17+
singleQuote: true,
18+
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
19+
quoteProps: 'as-needed',
20+
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
21+
trailingComma: 'all',
22+
// 在对象文字中的括号之间打印空格
23+
bracketSpacing: true,
24+
// jsx 中是否使用单引号
25+
jsxSingleQuote: false,
26+
// jsx 标签的反尖括号需要换行
27+
jsxBracketSameLine: false,
28+
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
29+
arrowParens: 'always',
30+
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
31+
rangeStart: 0,
32+
rangeEnd: Infinity,
33+
// 指定要使用的解析器,不需要写文件开头的 @prettier
34+
requirePragma: false,
35+
// 不需要自动在文件开头插入 @prettier
36+
insertPragma: false,
37+
// 使用默认的折行标准 always\never\preserve
38+
proseWrap: 'preserve',
39+
// 指定HTML文件的全局空格敏感度 css\strict\ignore
40+
htmlWhitespaceSensitivity: 'css',
41+
// 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF),
42+
// 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。
43+
// 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾
44+
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
45+
endOfLine: 'auto',
46+
//保存时自动格式化
47+
formatOnSave: true,
48+
//粘贴时自动格式化
49+
formatOnPaste: true,
50+
};

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false,
4+
"trailingComma": "none",
5+
"arrowParens": "avoid"
6+
}

0 commit comments

Comments
 (0)