refactor(plugin-rss)!: requires the ssg config, and remove _html field#3003
Merged
refactor(plugin-rss)!: requires the ssg config, and remove _html field#3003
ssg config, and remove _html field#3003Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
**修改总结**: 在 `packages/plugin-rss/src/plugin-rss.ts:81-98` 的 `beforeBuild` hook 中添加了 SSG 检查: - 使用与 `build.ts` 相同的逻辑检查 SSG 是否启用:`Boolean((config.ssg || config.llms) ?? true)` - 如果 SSG 被禁用(`ssg: false` 且没有 `llms`),抛出错误提示用户启用 SSG 或移除 RSS 插件 - 由于 `ssg` 默认为 `true`,这个检查只会在用户显式设置 `ssg: false` 时触发
9bf0fae to
c48a0dd
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the plugin-rss to remove dependency on the deprecated _html property from PageIndexInfo. Instead of storing HTML content in memory during page data extraction, the plugin now reads HTML content from SSG-generated output files during the build process.
Changes:
- Removed
_htmlproperty fromPageIndexInfotype and related processing - Refactored
plugin-rssto read HTML content from SSG output files instead of using the in-memory_htmlproperty - Replaced
@rspress/mdx-rsandhtml-to-textdependencies with native@mdx-js/mdxprocessor for MDX parsing
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Removed unused dependencies: @rspress/mdx-rs, html-to-text, and related packages |
| packages/shared/src/types/index.ts | Removed deprecated _html property from PageIndexInfo interface |
| packages/plugin-rss/src/plugin-rss.ts | Refactored to read HTML from SSG output files; added SSG validation; improved page tracking logic |
| packages/plugin-rss/src/internals/node.ts | Added helper functions for reading files, converting route paths to HTML paths, and extracting HTML content |
| packages/plugin-rss/src/createFeed.ts | Updated generateFeedItem to accept htmlContent parameter instead of using page._html |
| packages/core/src/node/runtimeModule/pageData/createPageData.ts | Removed _html from fields omitted during page data creation |
| packages/core/src/node/route/extractPageData.ts | Replaced mdx-rs compiler with @mdx-js/mdx processor; removed html-to-text conversion; simplified content extraction |
| packages/core/src/node/route/extractPageData.test.ts | Updated test snapshots to reflect removal of _html and changes to content extraction |
| packages/core/src/node/mdx/remarkPlugins/toc.ts | Added MdastRoot type support for parseToc function |
| packages/core/package.json | Removed @rspress/mdx-rs, html-to-text dependencies and their type definitions |
| e2e/fixtures/plugin-rss/doc/index.md | Fixed: Escaped <link> tag in markdown to prevent HTML interpretation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ssg config, and remove _html field
ssg config, and remove _html fieldssg config, and remove _html field
Timeless0911
approved these changes
Jan 13, 2026
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.
Summary
Refactor
plugin-rss, read HTML content from the SSG build output, replacing the deletedpage._htmlattribute.Related Issue
closes #2290
Checklist