diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f98407d6c2a..85771d6fa27 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,6 @@ # Contributing +- [Repository and organization](#repository-and-organization) - [Setup](#setup) - [Creating new themes](#creating-new-themes) - [Adding localizations](#adding-localizations) @@ -7,6 +8,23 @@ Thanks for considering to contribute! +## Repository and organization + +The canonical repository is now under the **[notionnext-org](https://github.com/notionnext-org)** GitHub organization (moved from personal ownership for clearer governance): + +**https://github.com/notionnext-org/NotionNext** + +If you contribute long-term or help with org-wide automation, check the organization page for how to join. **You are welcome to request membership** when that fits your role. + +If you cloned the repo before the transfer, update your default remote so you do not rely on redirects forever: + +```bash +git remote set-url origin https://github.com/notionnext-org/NotionNext.git +git remote -v +``` + +The fork-and-PR workflow is unchanged; open pull requests against **notionnext-org/NotionNext**. + ## Setup To contribute to NotionNext, follow these steps: @@ -28,6 +46,8 @@ Please follow these rules for every contribution: 4. Do not submit personalized config defaults that can affect other contributors. 5. Run lint/tests before opening PR. +Core maintainers should also read [Maintenance and change-control philosophy](./docs/MAINTENANCE_PHILOSOPHY.en.md) to keep `main` stable and reviewable. + For full Chinese workflow guidance, see: - [Docs Navigation](./docs/README.md) @@ -72,8 +92,8 @@ The configuration priority is: 2. Environment Variables 3. blog.config.js (lowest) -[fork]: https://github.com/tangly1024/NotionNext/fork -[pr]: https://github.com/tangly1024/NotionNext/compare +[fork]: https://github.com/notionnext-org/NotionNext/fork +[pr]: https://github.com/notionnext-org/NotionNext/compare [next.js]: https://github.com/vercel/next.js [themes-dir]: themes [example]: themes/example diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 28952f5dc62..1b95e41b692 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -1,5 +1,6 @@ # 贡献指南(中文) +- [仓库与组织](#仓库与组织) - [环境准备](#环境准备) - [新建主题](#新建主题) - [新增语言](#新增语言) @@ -7,6 +8,23 @@ 感谢你愿意为 NotionNext 做贡献! +## 仓库与组织 + +本仓库已由**个人账号**托管转为 **[GitHub 组织 notionnext-org](https://github.com/notionnext-org)** 管理,canonical 地址为: + +**https://github.com/notionnext-org/NotionNext** + +若你希望参与长期维护、CI 或组织内协作,可关注组织主页说明并申请加入(具体以组织公告为准)。**欢迎加入组织**,与维护者一起推进项目。 + +若你仍在使用转让前克隆的本地仓库,建议将默认远端改为组织地址,避免长期依赖旧 URL 重定向: + +```bash +git remote set-url origin https://github.com/notionnext-org/NotionNext.git +git remote -v +``` + +Fork 开发与向 `main` 提 PR 的流程不变;PR 的目标仓库请选择 **notionnext-org/NotionNext**。 + ## 环境准备 请按以下流程参与开发: @@ -33,6 +51,8 @@ 4. 不要提交会影响他人的个性化默认配置。 5. 提交前至少执行 lint / type-check / 必要测试。 +维护者与高频贡献者请阅读 [维护与变更尺度(共识)](./docs/MAINTENANCE_PHILOSOPHY.zh-CN.md),避免大范围、难回滚的改动影响主线稳定。 + 更多文档导航: - [文档导航入口(中文)](./docs/README.md) diff --git a/README.md b/README.md index c3e6f78ded5..46062a99a16 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,47 @@ -# 帮助教程 +
-
-
-
-
+
+
-
-
+
+
-
+
@@ -34,6 +54,8 @@ Notion是一个能让效率暴涨的生产力引擎,可以帮你书写文档
一个使用 NextJS + Notion API 实现的,部署在 Vercel 上的静态博客系统。为Notion和所有创作者设计。
+**仓库托管:** 主仓库现由 GitHub 组织 **[notionnext-org](https://github.com/notionnext-org)** 维护(canonical:`https://github.com/notionnext-org/NotionNext`)。欢迎参与贡献并关注组织内协作说明;若在转让前已克隆本地仓库,建议执行 `git remote set-url origin https://github.com/notionnext-org/NotionNext.git` 后使用 `git remote -v` 确认。
+
支持多种部署方案
## 新开发者 3 分钟上手
@@ -69,6 +91,8 @@ yarn dev
- [Theme Migration Guide (English)](./docs/THEME_MIGRATION_GUIDE.md)
- [贡献入口(中文)](./CONTRIBUTING.zh-CN.md)
- [贡献入口(英文)](./CONTRIBUTING.md)
+- [维护与变更尺度(中文)](./docs/MAINTENANCE_PHILOSOPHY.zh-CN.md)
+- [Maintenance & change control (English)](./docs/MAINTENANCE_PHILOSOPHY.en.md)
## 预览效果
@@ -90,7 +114,7 @@ yarn dev
致敬每一位开发者!
-[](https://github.com/tangly1024/NotionNext/graphs/contributors)
+[](https://github.com/notionnext-org/NotionNext/graphs/contributors)
## 引用技术
@@ -110,4 +134,4 @@ The MIT License.
## Star History
-[](https://star-history.com/#tangly1024/NotionNext&Date)
+[](https://star-history.com/#notionnext-org/NotionNext&Date)
diff --git a/README_EN.md b/README_EN.md
index d4b84d98059..88c51f57e20 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -13,14 +13,14 @@ You can set up your personal website in just a few minutes. Here is the link to
# NotionNext
+
+
-
-
+
+
-
+
@@ -34,6 +34,8 @@ You can set up your personal website in just a few minutes. Here is the link to
A static blog system built with NextJS and Notion API, deployed on Vercel. Designed for Notion and all creators.
+**Repository hosting:** The main repository is maintained by the GitHub organization **[notionnext-org](https://github.com/notionnext-org)** (canonical: `https://github.com/notionnext-org/NotionNext`). Contributions are welcome; see the org page for collaboration. If you cloned before the transfer, run `git remote set-url origin https://github.com/notionnext-org/NotionNext.git` and verify with `git remote -v`.
+
## 3-Minute Quick Start
@@ -67,6 +69,8 @@ To help new contributors get started quickly, the project keeps docs bilingual w
- [Theme Migration Guide (English)](./docs/THEME_MIGRATION_GUIDE.md)
- [贡献入口(中文)](./CONTRIBUTING.zh-CN.md)
- [Contribution Guide (English)](./CONTRIBUTING.md)
+- [维护与变更尺度(中文)](./docs/MAINTENANCE_PHILOSOPHY.zh-CN.md)
+- [Maintenance & change control (English)](./docs/MAINTENANCE_PHILOSOPHY.en.md)
## Preview
@@ -88,7 +92,7 @@ Special thanks to Craig Hart for initiating the Nobelium project.
This project exists thanks to all the people who contribute.
-[](https://github.com/tangly1024/NotionNext/graphs/contributors)
+[](https://github.com/notionnext-org/NotionNext/graphs/contributors)
## Technologies Used
diff --git a/__tests__/lib/staticPaths.test.js b/__tests__/lib/staticPaths.test.js
index d891b44d7d8..d08dd1d3cc1 100644
--- a/__tests__/lib/staticPaths.test.js
+++ b/__tests__/lib/staticPaths.test.js
@@ -46,6 +46,32 @@ describe('staticPaths build helpers', () => {
})
})
+ it('does not keep a rejected allPages lookup pinned in process memory', async () => {
+ isExport.mockReturnValue(false)
+ fetchGlobalAllData
+ .mockRejectedValueOnce(new Error('notion unavailable'))
+ .mockResolvedValueOnce({
+ allPages: [
+ { id: '1', slug: 'hello', type: 'Post', status: 'Published' }
+ ]
+ })
+ getPriorityPages.mockReturnValue([])
+
+ await jest.isolateModulesAsync(async () => {
+ const { getSharedAllPages } = require('@/lib/build/staticPaths')
+
+ await expect(getSharedAllPages({ from: 'slug-paths' })).rejects.toThrow(
+ 'notion unavailable'
+ )
+ await expect(getSharedAllPages({ from: 'slug-paths' })).resolves.toEqual([
+ { id: '1', slug: 'hello', type: 'Post', status: 'Published' }
+ ])
+
+ expect(fetchGlobalAllData).toHaveBeenCalledTimes(2)
+ expect(getOrSetDataWithCache).toHaveBeenCalledTimes(2)
+ })
+ })
+
it('prefetches once per route call in export mode and returns all matching paths', async () => {
isExport.mockReturnValue(true)
fetchGlobalAllData.mockResolvedValue({
diff --git a/docs/MAINTENANCE_PHILOSOPHY.en.md b/docs/MAINTENANCE_PHILOSOPHY.en.md
new file mode 100644
index 00000000000..277c47d5e48
--- /dev/null
+++ b/docs/MAINTENANCE_PHILOSOPHY.en.md
@@ -0,0 +1,51 @@
+# Maintenance and change-control philosophy
+
+This document is for **core maintainers and frequent contributors**. Read it together with [Contributing](../CONTRIBUTING.md) and [Contribution workflow](./CONTRIBUTION_WORKFLOW.en.md). The goal is to welcome contributions while **reducing large, hard-to-control changes** that destabilize `main` and fork ecosystems.
+
+## Principles
+
+1. **Small, reviewable, revertible steps**: Prefer several focused PRs over one huge, hard-to-review batch.
+2. **Intent before code**: For behavior or data-contract changes, align scope in an Issue or Discussion before opening the PR.
+3. **Protect core paths**: Data layer, routing, global config, and build/export pipelines affect the whole project—PRs should explain motivation, risk, and how they were verified.
+4. **No unrelated refactors mixed in**: Do not bundle wide renames, mass formatting, or major dependency bumps with unrelated fixes or features; split PRs when needed.
+5. **Dependencies and toolchain**: Major framework or lockfile-policy upgrades need rationale, breaking-change notes, and regression checks (build, critical-path tests).
+
+## Suggested PR sizing
+
+| Kind | Suggested approach |
+| --- | --- |
+| Bugfix | Minimal fix + tests or clear repro notes |
+| Small feature / theme-local | Keep within theme or a single module boundary; avoid drive-by shared-layer edits |
+| Cross-theme / shared API | Agree API and defaults in an Issue first; keep migrations documented |
+| Breaking changes | Document version/config migration; split into phases if it helps reviewers |
+
+## High-impact areas (extra clarity expected)
+
+Changes here tend to affect all sites or many themes—**PR descriptions and verification notes should be stronger** (whether two-person review is required is up to owners and maintainers):
+
+- `lib/db/` (including `SiteDataApi`, Notion fetch and caching)
+- `pages/` SSG/ISR, i18n, and build-lifecycle logic
+- `next.config.js` and export/build scripts
+- Global config (`blog.config.js`, `lib/config.js`, and similar defaults)
+- Security-sensitive areas: auth, secrets, third-party callbacks, CSP, etc.
+
+## Keeping the project from drifting
+
+- **Prefer opt-in or configurable behavior** for niche site assumptions; avoid baking them into global defaults.
+- **Theme isolation**: Keep theme-specific logic under `themes/