feat(rss): add option to disable full content - #4467
Merged
tangly1024 merged 3 commits intoAug 26, 2026
Conversation
|
@ZZHow1024 is attempting to deploy a commit to the tangly1024's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for notionnext-netlify ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tangly1024
approved these changes
Aug 26, 2026
tangly1024
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the RSS option change. The default remains full-content RSS, summary mode skips block fetching, and the focused regression plus core CI are green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2419
已知问题
RSS 当前默认返回文章完整正文
getPostBlocks获取 Notion Blocks解决方案
新增
RSS_FULL_CONTENT配置项,用于控制 RSS 是否返回文章完整正文RSS_FULL_CONTENT=true:保持现有行为,RSS 返回文章完整正文RSS_FULL_CONTENT=false:RSS 的content仅返回post.summarytrue,保持向后兼容,不改变现有用户的默认行为摘要模式下跳过文章正文获取和处理
createFeedContent中提前返回post.summarygetPostBlocks保持加密文章原有行为
改动收益
支持按需使用摘要 RSS
减少 RSS 生成开销
RSS_FULL_CONTENT=false时不再额外获取文章 Blocks保持向后兼容
RSS_FULL_CONTENT默认值为true具体改动
blog.config.jsRSS_FULL_CONTENT配置RSS_FULL_CONTENT配置truelib/config.jsRSS_FULL_CONTENT加入服务端配置处理siteConfig正确读取NOTION_CONFIG/blog.config.js中的配置false正确转换为布尔值lib/utils/rss.jsgenerateRss中读取RSS_FULL_CONTENTcreateFeedContentRSS_FULL_CONTENT=false时直接返回post.summarygetPostBlocks及后续正文处理逻辑.env.exampleRSS_FULL_CONTENT环境变量示例docs/user-guide/reference/features.mdRSS_FULL_CONTENT配置说明__tests__/lib/utils/rss.test.jsRSS_FULL_CONTENT=false回归测试description和content均使用post.summarygetPostBlocks效果截图
RSS_FULL_CONTENT=true保持原有全文 RSS 行为。
RSS_FULL_CONTENT=falseRSS 中
description和content:encoded均只包含文章摘要,不再包含完整 Notion HTML 正文。测试确认
RSS_FULL_CONTENT=true时 RSS 正常输出完整正文RSS_FULL_CONTENT=false时 RSS 仅输出文章摘要RSS_FULL_CONTENT=false时不再获取文章 BlocksRSS_FULL_CONTENT时保持原有全文 RSS 行为用户文档(
docs/user-guide//docs/developer/)如果本 PR 新增或修改了站长会使用的功能、主题配置、环境变量、Notion Config 键、插件开关、部署步骤、默认行为或可见 UI 交互,请同步更新
docs/user-guide/或docs/developer/中对应说明,并在下方勾选已完成项。只有纯内部重构、测试、CI、依赖维护、拼写修正等不改变站长使用方式的改动,才可以勾选「不适用」。
docs/user-guide/目录约定conf/*.config.js一致(若文档涉及配置).env、私有 ID文档说明:本 PR 与 RSS 功能配置配套,已在
docs/user-guide/reference/features.md中补充RSS_FULL_CONTENT配置说明。