Skip to content

Update#128

Open
lifeafter619 wants to merge 172 commits into
mainfrom
update
Open

Update#128
lifeafter619 wants to merge 172 commits into
mainfrom
update

Conversation

@lifeafter619
Copy link
Copy Markdown
Owner

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

已知问题

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

解决方案

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

改动收益

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

具体改动

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

测试确认

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

RHZHZ and others added 30 commits February 9, 2026 22:26
Removed state and function.isFlippedhandleCardFlip
Added div to encapsulate front and back.flip-card-inner
Updated CSS for smoother transitions and added .perspective
Modified hover effects for better interaction.
针对 Next.js build/export 多 worker 并发场景,重构 block prefetch 的构建期协调流程,
避免 prefetch_all_blocks 在等待超时后重复执行,同时保留持锁 worker 异常后的补位能力,降低 Notion 重复请求和构建不稳定风险。

本次提交主要包括:
- 将全量 block 预热从通用 withFileLock 逻辑中拆出,改为 prefetch 专用的跨进程锁协调实现
- 为共享预热增加独立的 lock、done、skipped 标记文件,按构建会话维度协调 worker 行为
- 新增持锁心跳和 stale lock 清理机制,避免 owner 异常退出后锁长期残留
- 调整等待方语义:等待超时仅跳过当前 worker,不再让单个等待者替整轮 build 提前放弃共享预热
- 调整 skipped 语义:仅在持锁 worker 预热异常时写入全局 skipped 标记,后续成功抢锁的新 holder 仍可清理旧标记并接手预热
- 保留 done 标记复用逻辑,确保预热成功后其余 worker 直接复用缓存结果,不再重复执行全量预热
- 补充更清晰的 prefetch 日志输出,便于在 Cloudflare 等多进程构建环境中定位等待、接手和跳过行为

预期效果:
- 同一次 build/export 中仅有一个 worker 执行全量 block prefetch
- 等待超时不会直接导致其他 worker 重复启动全量预热
- 持锁 worker 异常后,后续 worker 仍可通过 stale-lock 补位接手
- 在 Notion 响应较慢或构建并发较高时,构建行为更稳定且更容易排查
Prevent invalid heading indent data from emptying the indent stack and crashing post rendering, while adding dev-only diagnostics for unknown heading blocks.

Made-with: Cursor
Increment package version for the TOC hotfix release line.

Made-with: Cursor
…g-indent-crash

Fix TOC parsing for newer Notion heading types.
…3937)

Partial merge from PR notionnext-org#3937: MenuItem.js and MenuList.js only; excludes blog.config, theme config, and yarn.lock.

Made-with: Cursor
…-lock

并发编译优化:基于 notionnext-org#3906 补强 export 阶段 block prefetch 的多 Worker 协调
Keep a guardrail in resolutions to prevent form-data from regressing to vulnerable versions while avoiding unrelated package sorting changes.

(cherry picked from commit 2eef82c)
Made-with: Cursor
…-form-data-resolution

security: pin form-data resolution to ^4.0.4
Add collection_id fallback inference for site data and config parsing when Notion metadata omits stable collection_id in newer data source structures.

(adapted from commit 6109153)

Made-with: Cursor
…lectionid-fallback

Fix Notion data source schema parsing and page list merging.
…card-hover-behavior

fix: 修复 heo 主题交流频道翻转卡片悬停状态异常
Refine NotionLink behavior to keep same-origin absolute article URLs in the current tab while preserving explicit _blank targets, safe rel tokens, and non-http link defaults.

Made-with: Cursor
…k-new-tab-behavior-v2

fix(notion): open external article links in new tabs with same-origin safeguard
tanglyqq and others added 26 commits May 5, 2026 23:27
…ail-themes-and-docs

feat(theme-switch): manifest, tier badges, wider panel, docs
…next-org#4017)

- Pin Node 20.18.0 in .nvmrc to avoid build failures when platforms lack patch releases like 20.20.0
- Document EdgeOne Pages behavior and nvm install without hardcoded version in README
…g#4018)

- Cap article (#article-wrapper) at 64rem for Notion/dashboard pages
- At xl+, constrain .container to 72rem within #theme-starter for balanced layout
…otionnext-org#4019)

- Style draggable theme panel from global isDarkMode so it matches toggle/html.dark regardless of Tailwind darkMode config
- Tune borders, shadows, palette gradient, text and focus ring for dark surfaces
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.6 to 8.5.10.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.5.6...8.5.10)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.10
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [axios](https://github.com/axios/axios) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.18.1)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…-org#4000)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…otionnext-org#3992)

`generateRss` and `checkDataFromAlgolia` are both async functions,
but they were called without `await` inside `getStaticProps`. This
creates a race condition where the build process may finish and
proceed to deployment before the RSS files (public/rss/feed.xml,
atom.xml, feed.json) are actually written to disk.

Contrast with `generateRobotsTxt` and `generateSitemapXml` which
are synchronous and complete immediately — they are unaffected.

Symptoms:
- RSS feed returns 404 or corrupted content after deployment
- The issue is non-deterministic (depends on how many posts need
  Notion API calls and whether the build finishes first)
- More likely to manifest in CI/CD environments where the build
  completes quickly and immediately copies artifacts

Root cause in generateRss:
- For each post, it calls `await getPostBlocks(post.id, 'rss-content')`
  to fetch content from the Notion API
- Then renders each post via `ReactDOMServer.renderToString()`
- Finally writes feed.xml / atom.xml / feed.json to public/rss/
- Without `await`, getStaticProps returns before any of this completes

The fix simply adds `await` to both calls so getStaticProps waits
for file generation to complete before returning.

Co-authored-by: Cursor <cursoragent@cursor.com>
与删除 sitemap.xml 同类:避免遗留的旧 feed.xml/atom.xml/feed.json 与当前生成逻辑不一致。思路来自 PR notionnext-org#3123,仅摘预构建清理一段。

Co-authored-by: t <dev@x3game.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.15.0...v1.15.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- 与 gitbook Catalog 一致:currentSectionId 每次从 null 计算,避免错误沿用上一帧 activeSection\n- useMemo 稳定 tocIds;修正 indexOf 为 -1 时的滚动偏移\n- fuwari-toc-wrapper 类统一滚动侧栏与移动端两份目录容器\n- 卸载时 cancel throttle

Co-authored-by: Cursor <cursoragent@cursor.com>
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/picomatch@2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.2 to 3.4.2.
- [Commits](WebReflection/flatted@v3.3.2...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…otionnext-org#4022)

- Notion 明文密码同步为 SHA256(hex);支持字段内直接填 64 位 SHA256;保留 32 位 md5 串视为旧摘要\n- 前台校验:同时尝试 SHA256(明文) 与 md5(slug+明文)\n- localStorage 键改为 pathname only,与 getPasswordQuery 一致\n- 新增依赖 js-sha256;Gravatar 等仍使用 md5(email),未改动

Co-authored-by: t <dev@x3game.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(notion): open article links in new tabs

* 修复由于Notion数据格式改变导致的编译异常

(cherry picked from commit d396e25)

* 格式进一步兼容,异常fetch处理

(cherry picked from commit 8ef9fc4)

* test: cover newer notion payload compatibility

* chore(ci): align .github/workflows with fork branch for push without workflow OAuth scope

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(ci): align validation and tests with jest; fix staticPaths duplicate

- validation: stricter email local part, URL via URL API, sanitizeXss leftover alerts
- tests: sitemap import path, LazyImage priority load via Image mock, missing src
- jest: drop unrealistic global coverage thresholds for test:ci
- staticPaths: remove duplicate getLatestSlugs export; sync helper

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: t <dev@x3game.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(ui): global article route skeleton on client navigation

- Detect article-style paths (/prefix/slug, optional locale) vs archive/category/tag/etc.
- Show ArticleRouteSkeleton overlay during route transition (respects shallow routing)
- Complements existing onLoading + theme Transitions (e.g. Hexo) to reduce blank main area

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(hexo): inline article loading card instead of global skeleton

- Remove global ArticleRouteSkeleton and path detection from lib/global
- Hexo main column shows ArticleSwitchPlaceholder (card + spinner) on /[prefix]/[slug] during onLoading
- Add HEXO_ARTICLE_ROUTE_LOADING to hexo config; COMMON.LOADING / LOADING_ARTICLE strings

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: t <dev@x3game.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve add/add conflict in notion-data-format.test.js: combine PR heading/TOC
tests with main's p-limit mock and notion-utils mock for getTextContent.

Co-authored-by: Cursor <cursoragent@cursor.com>
…1-heading-compat

fix: normalize newer Notion heading blocks
Add workflow and script to increment the last version segment after each
merge to main; use [skip-version] in bot commits to avoid loops.

Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: add community site roadmap

* docs: address review on community roadmap

- Clarify roadmap vs future schema/examples docs; remove resume section
- Note Member/Event alignment with type, SiteDataApi, routing
- Link from root README and docs index

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: tangly1024 <mail@tangly1024.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rg#4033)

Co-authored-by: tangly1024 <mail@tangly1024.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
notionnext Error Error May 13, 2026 5:08pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.