Skip to content

docs(plugin-rss): enrich feed.test usage example#3239

Merged
SoonIter merged 2 commits intomainfrom
copilot/add-rss-test-configuration-example
Mar 18, 2026
Merged

docs(plugin-rss): enrich feed.test usage example#3239
SoonIter merged 2 commits intomainfrom
copilot/add-rss-test-configuration-example

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

The plugin-rss docs only described the test option by type, without showing a practical callback example. This update adds a clearer example for a common case: including blog article pages while excluding the blog index route.

  • Docs update

    • Added a concrete feed.test function example to the @rspress/plugin-rss docs.
    • Placed the example directly under the test option in FeedChannel, where users look for matching behavior details.
  • Locale parity

    • Updated both Chinese and English plugin docs so the example stays consistent across locales.
  • Example added

    feed: {
      id: 'blog',
      test: (item) => {
        return (
          item.routePath.startsWith('/blog/') && item.routePath !== '/blog/'
        );
      },
    }
  • What this clarifies

    • test can be a callback, not just a string/regexp matcher.
    • Route filtering can exclude index pages while keeping nested content pages.
  • Screenshot

    • plugin-rss docs update

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: SoonIter <79413249+SoonIter@users.noreply.github.com>
Copilot AI changed the title [WIP] Add examples for plugin-rss test configuration docs(plugin-rss): enrich feed.test usage example Mar 17, 2026
Copilot AI requested a review from SoonIter March 17, 2026 09:25
@SoonIter SoonIter marked this pull request as ready for review March 17, 2026 09:30
@SoonIter SoonIter enabled auto-merge (squash) March 17, 2026 09:30
@SoonIter
Copy link
Copy Markdown
Member

#3192

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 567b442
Status: ✅  Deploy successful!
Preview URL: https://f9bcf3d6.rspress-v2.pages.dev
Branch Preview URL: https://copilot-add-rss-test-configu.rspress-v2.pages.dev

View logs

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

Updates @rspress/plugin-rss documentation to better explain FeedChannel.test by adding a practical callback example for filtering blog routes, keeping English and Chinese docs aligned.

Changes:

  • Added a concrete feed.test callback example demonstrating inclusion/exclusion of specific routes.
  • Placed the example directly under the test option for easier discoverability.
  • Mirrored the change in both en and zh documentation for locale parity.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
website/docs/zh/plugin/official-plugins/rss.mdx Adds a feed.test callback example under the test option in Chinese docs.
website/docs/en/plugin/official-plugins/rss.mdx Adds the same feed.test callback example under the test option in English docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (6445474c98) does not have baseline artifacts. Using commit 10031f930c for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 3 projects in monorepo, 3 projects with changes.

📊 Quick Summary
Project Total Size Change
node 12.4 MB +7.7 KB (0.1%)
node_md 1.6 MB +1008.0 B (0.1%)
web 16.1 MB +6.3 KB (0.0%)
📋 Detailed Reports (Click to expand)

📁 node

Path: website/doc_build/diff-rsdoctor/node/rsdoctor-data.json

📌 Baseline Commit: 10031f930c | PR: #3237

Metric Current Baseline Change
📊 Total Size 12.4 MB 12.4 MB +7.7 KB (0.1%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 12.4 MB 12.4 MB +7.7 KB (0.1%)
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: node Bundle Diff

📁 node_md

Path: website/doc_build/diff-rsdoctor/node_md/rsdoctor-data.json

📌 Baseline Commit: 10031f930c | PR: #3237

Metric Current Baseline Change
📊 Total Size 1.6 MB 1.6 MB +1008.0 B (0.1%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 1.6 MB 1.6 MB +1008.0 B (0.1%)

📦 Download Diff Report: node_md Bundle Diff

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: 10031f930c | PR: #3237

Metric Current Baseline Change
📊 Total Size 16.1 MB 16.1 MB +6.3 KB (0.0%)
📄 JavaScript 15.9 MB 15.9 MB +6.3 KB (0.0%)
🎨 CSS 120.4 KB 120.4 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 166.2 KB 166.2 KB 0

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

@SoonIter SoonIter merged commit fb89e62 into main Mar 18, 2026
12 checks passed
@SoonIter SoonIter deleted the copilot/add-rss-test-configuration-example branch March 18, 2026 12:15
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.

4 participants