Skip to content

refactor(plugin-rss)!: requires the ssg config, and remove _html field#3003

Merged
SoonIter merged 2 commits intomainfrom
syt-vibe-kanban/cfcd-plugin-rss
Jan 13, 2026
Merged

refactor(plugin-rss)!: requires the ssg config, and remove _html field#3003
SoonIter merged 2 commits intomainfrom
syt-vibe-kanban/cfcd-plugin-rss

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Jan 13, 2026

Summary

Refactor plugin-rss, read HTML content from the SSG build output, replacing the deleted page._html attribute.

Related Issue

closes #2290

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).


Copilot AI review requested due to automatic review settings January 13, 2026 08:50
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 13, 2026

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit c48a0dd
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/69660899ec741000082e605a
😎 Deploy Preview https://deploy-preview-3003--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title plugin-rss 重构 (vibe-kanban) refactor(plugin-rss): read HTML content from SSG output instead of deprecated _html property Jan 13, 2026
@SoonIter SoonIter changed the title refactor(plugin-rss): read HTML content from SSG output instead of deprecated _html property refactor(plugin-rss): 从 SSG 产物中读取 HTML 内容 Jan 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 13, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
node 10.0 MB 0
node_md 1.3 MB 0
web 15.7 MB 0

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` 时触发
@SoonIter SoonIter force-pushed the syt-vibe-kanban/cfcd-plugin-rss branch from 9bf0fae to c48a0dd Compare January 13, 2026 08:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 _html property from PageIndexInfo type and related processing
  • Refactored plugin-rss to read HTML content from SSG output files instead of using the in-memory _html property
  • Replaced @rspress/mdx-rs and html-to-text dependencies with native @mdx-js/mdx processor 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.

@SoonIter SoonIter changed the title refactor(plugin-rss): 从 SSG 产物中读取 HTML 内容 refactor(plugin-rss)!: force the ssg config, and remove _html field Jan 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@SoonIter SoonIter changed the title refactor(plugin-rss)!: force the ssg config, and remove _html field refactor(plugin-rss)!: requires the ssg config, and remove _html field Jan 13, 2026
@SoonIter SoonIter requested a review from Timeless0911 January 13, 2026 09:22
@SoonIter SoonIter enabled auto-merge (squash) January 13, 2026 09:23
@SoonIter SoonIter merged commit 5310781 into main Jan 13, 2026
11 checks passed
@SoonIter SoonIter deleted the syt-vibe-kanban/cfcd-plugin-rss branch January 13, 2026 09:26
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.

[Refactor]: Remove "_html" field in PageIndexInfo

3 participants