Skip to content

合并到个人base分支#5

Merged
XiaoFeng9009 merged 37 commits into
XiaoFeng9009-patch-basefrom
main
May 28, 2026
Merged

合并到个人base分支#5
XiaoFeng9009 merged 37 commits into
XiaoFeng9009-patch-basefrom
main

Conversation

@XiaoFeng9009

Copy link
Copy Markdown
Owner

尽量按此模板PR内容,或粘贴相关的ISSUE链接。

已知问题

  1. (示例)版本号管理不规范
    • 版本号直接写在环境变量中,容易出错
    • 多处维护版本号,可能不一致

解决方案

  1. (示例)将版本号管理从 .env.local 迁移到 package.json
    • 统一从 package.json 读取版本号
    • 使用 IIFE 优雅处理版本号获取逻辑
    • 保持向后兼容,支持环境变量覆盖

改动收益

  1. (示例)更规范的版本管理
    • 统一从 package.json 读取
    • 保持与 npm 生态一致
    • 减少人为错误

具体改动

  1. (示例)blog.config.js
    • 移除原有的静态版本号配置
    • 在文件末尾添加动态版本号获取逻辑
    • 保持向后兼容,优先使用环境变量
    • 添加错误处理和默认值

测试确认

  • 本地开发环境测试通过
  • 生产环境构建测试通过
  • (如适用)版本号正确显示
  • (如适用)环境变量配置正常工作

用户文档(docs/user-guide/

若本 PR 修改 docs/user-guide/docs/developer/ 中与站长相关的说明,可勾选「不适用」并跳过本节。

  • 不适用(无文档改动)
  • 已按 维护工作流 自检
  • 路径符合 docs/user-guide/ 目录约定
  • 已更新 user-guide/README.md(新增/移动文章时)
  • 已更新 ARTICLE_INDEX.md(新 slug 或路径变更时)
  • 环境变量名与 conf/*.config.js 一致(若文档涉及配置)
  • 示例中无真实 Token、.env、私有 ID
  • 保留或更新了「原文链接」(若源自 docs.tangly1024.com)

文档说明(可选):对应官方 slug / URL、是否与功能 PR 配套

dependabot Bot and others added 30 commits May 26, 2026 17:18
Bumps the dev-dependencies group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@netlify/plugin-nextjs](https://github.com/opennextjs/opennextjs-netlify) | `5.15.10` | `5.15.11` |
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `6.7.0` | `6.9.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.15.3` | `22.19.19` |
| [@waline/client](https://github.com/walinejs/waline/tree/HEAD/packages/client) | `3.6.0` | `3.13.0` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.21` | `10.5.0` |
| [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) | `9.1.0` | `9.1.2` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.5.1` | `5.5.5` |
| [postcss](https://github.com/postcss/postcss) | `8.5.14` | `8.5.15` |
| [prettier](https://github.com/prettier/prettier) | `3.6.2` | `3.8.3` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `3.4.17` | `3.4.19` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.6.2` | `5.9.3` |


Updates `@netlify/plugin-nextjs` from 5.15.10 to 5.15.11
- [Release notes](https://github.com/opennextjs/opennextjs-netlify/releases)
- [Changelog](https://github.com/opennextjs/opennextjs-netlify/blob/main/CHANGELOG.md)
- [Commits](opennextjs/opennextjs-netlify@v5.15.10...v5.15.11)

Updates `@testing-library/jest-dom` from 6.7.0 to 6.9.1
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v6.7.0...v6.9.1)

Updates `@types/node` from 22.15.3 to 22.19.19
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@waline/client` from 3.6.0 to 3.13.0
- [Changelog](https://github.com/walinejs/waline/blob/main/CHANGELOG.md)
- [Commits](https://github.com/walinejs/waline/commits/HEAD/packages/client)

Updates `autoprefixer` from 10.4.21 to 10.5.0
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.4.21...10.5.0)

Updates `eslint-config-prettier` from 9.1.0 to 9.1.2
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/commits)

Updates `eslint-plugin-prettier` from 5.5.1 to 5.5.5
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-plugin-prettier@v5.5.1...v5.5.5)

Updates `postcss` from 8.5.14 to 8.5.15
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.5.14...8.5.15)

Updates `prettier` from 3.6.2 to 3.8.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.6.2...3.8.3)

Updates `tailwindcss` from 3.4.17 to 3.4.19
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v3.4.19/packages/tailwindcss)

Updates `typescript` from 5.6.2 to 5.9.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v5.6.2...v5.9.3)

---
updated-dependencies:
- dependency-name: "@netlify/plugin-nextjs"
  dependency-version: 5.15.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 6.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: "@types/node"
  dependency-version: 22.19.19
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: "@waline/client"
  dependency-version: 3.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: autoprefixer
  dependency-version: 10.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: eslint-config-prettier
  dependency-version: 9.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: postcss
  dependency-version: 8.5.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: prettier
  dependency-version: 3.8.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: tailwindcss
  dependency-version: 3.4.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@clerk/localizations](https://github.com/clerk/javascript/tree/HEAD/packages/localizations) from 3.17.1 to 3.37.6.
- [Release notes](https://github.com/clerk/javascript/releases)
- [Changelog](https://github.com/clerk/javascript/blob/@clerk/localizations@3.37.6/packages/localizations/CHANGELOG.md)
- [Commits](https://github.com/clerk/javascript/commits/@clerk/localizations@3.37.6/packages/localizations)

---
updated-dependencies:
- dependency-name: "@clerk/localizations"
  dependency-version: 3.37.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@supabase/supabase-js](https://github.com/supabase/supabase-js/tree/HEAD/packages/core/supabase-js) from 2.106.0 to 2.106.2.
- [Release notes](https://github.com/supabase/supabase-js/releases)
- [Changelog](https://github.com/supabase/supabase-js/blob/master/packages/core/supabase-js/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-js/commits/v2.106.2/packages/core/supabase-js)

---
updated-dependencies:
- dependency-name: "@supabase/supabase-js"
  dependency-version: 2.106.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…/npm_and_yarn/supabase/supabase-js-2.106.2

chore: bump @supabase/supabase-js from 2.106.0 to 2.106.2
…/npm_and_yarn/clerk/localizations-3.37.6

chore: bump @clerk/localizations from 3.17.1 to 3.37.6
…/npm_and_yarn/dev-dependencies-0e3a453dfb

chore: bump the dev-dependencies group with 11 updates
…version-bump-workflow

ci: create PR for automatic version bumps
…qs-resolution

fix: resolve qs to patched version
…version-bump-branch-only

ci: push version bump branch without creating PR
…-package-version

chore(release): bump package.json to 4.9.5.4 [skip-version]
…open-security-alerts

fix: resolve patched transitive dependencies
Version bump after dependency maintenance.
…endspace-custom-menu

fix(endspace): support custom nested menus
Closes notionnext-org#4035

## What this PR adds

NotionNext currently works well for personal blogs and knowledge bases,
but lacks first-class support for community/org websites. This PR adds
the foundational data layer for community features.

### Changes

**conf/notion.config.js**
- Add `type_member` and `type_event` property type values
- Env vars: `NEXT_PUBLIC_NOTION_PROPERTY_TYPE_MEMBER`, `NEXT_PUBLIC_NOTION_PROPERTY_TYPE_EVENT`

**lib/db/SiteDataApi.js**
- Add `allMembers` — filtered from allPages (type=Member, status=Published), sorted by featured > verified > sortOrder > publishDate
- Add `allEvents` — filtered from allPages (type=Event, status=Published), sorted by publishDate desc
- Fix: scheduled publishing (`POST_SCHEDULE_PUBLISH`) no longer hides Event/Member entries with future dates — future-dated events are "upcoming", not "unpublished"
- Add `getAllMembers()` and `getAllEvents()` exported helper functions
- Include allMembers/allEvents in EmptyData fallback

**lib/db/notion/memberDataSource.js** (new)
- Official API supplement for Member data
- Handles case where unofficial API (notion-client) filters out Member-type entries from database views
- `fetchMembersFromOfficialAPI()` — queries Notion data_sources endpoint with type/status filter
- `mapOfficialMemberPage()` — normalizes Notion properties to Member data object
- Supports all community fields: avatar, role, bio, quote, featured, verified, social links, etc.

## Architecture

```
Notion Database
├── type=Post    → allPages, allNavPages, latestPosts
├── type=Page    → customNav
├── type=Menu    → customMenu
├── type=Member  → allMembers  ← NEW
├── type=Event   → allEvents   ← NEW
├── type=Notice  → notice
└── type=CONFIG  → NOTION_CONFIG
```

## How themes consume the data

```jsx
// In getStaticProps / LayoutIndex
const { allMembers, allEvents } = await getGlobalData()

// Members section
<MembersSection members={allMembers} />

// Events section
<EventsSection events={allEvents} />

// Field notes (finished events)
<FieldNotesSection events={allEvents.filter(e => e.ext?.status === 'finished')} />
```

## ext field convention for Events

Events use the existing `ext` JSON field for structured data:

```json
{
  "status": "open",
  "location": "长沙",
  "format": "offline",
  "dateText": "2026 / 06 / 14",
  "registrationUrl": "https://...",
  "agenda": ["签到", "分享", "讨论"],
  "hosts": ["社区名"],
  "content": [{"heading": "...", "body": "..."}]
}
```

## Working implementation

This PR is the upstream extraction of a working community website (IGNAI)
built on NotionNext. The full implementation includes:
- Member directory page (`/members`)
- Member profile page (`/members/[slug]`)
- Event listing (`/events`)
- Event detail (`/events/[slug]`)
- Join form → Notion write-back
- Author-to-member mapping

See: https://github.com/qianzhu18/IGN-AI

## Env vars

```env
NOTION_PAGE_ID=<main-database-id>
NOTION_API_TOKEN=<integration-token>           # For official API member supplement
NOTION_MEMBERS_DATA_SOURCE_ID=<data-source-id> # For official API member supplement
```

Only `NOTION_PAGE_ID` is required. The other two enable the official API
member supplement pipeline (useful when the unofficial API filters out
Member-type entries).
…backend

feat: community backend — Member & Event data types (notionnext-org#4035)
@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notion-next Ready Ready Preview, Comment May 28, 2026 7:16am

@XiaoFeng9009 XiaoFeng9009 merged commit 8a9ccd5 into XiaoFeng9009-patch-base May 28, 2026
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants