Skip to content

feat(feed): add external tag to linkposts in RSS feeds - #1059

Merged
Xe merged 1 commit into
mainfrom
me/site-9-linkposts-should-have-an-external-tag-in-the-rss-feed
Nov 1, 2025
Merged

feat(feed): add external tag to linkposts in RSS feeds#1059
Xe merged 1 commit into
mainfrom
me/site-9-linkposts-should-have-an-external-tag-in-the-rss-feed

Conversation

@Xe

@Xe Xe commented Nov 1, 2025

Copy link
Copy Markdown
Owner

Summary

Closes SITE-9

This change adds support for automatically tagging linkposts (posts with redirect_to field) with an "external" tag in both RSS and JSON feeds. This allows readers to perform client-side filtering to identify external content.

Changes Made

  • Added categories field to FeedItem interface in the feed plugin
  • Enhanced feed item creation to detect linkposts via redirect_to field
  • Automatically append "external" tag to linkposts while preserving any existing tags
  • Include categories in RSS feed as <category> elements
  • Include categories in JSON feed as tags array

Test Plan

  • Verified that linkposts (posts with redirect_to field) correctly receive the <category>external</category> tag in RSS feeds
  • Verified that regular posts do not receive the external tag
  • Verified that JSON feeds include the "external" tag in the tags array for linkposts
  • Confirmed that existing tags are preserved when present
  • Tested with both internal and external URLs

Implementation Details

The implementation works by:

  1. Detecting if a blog post has a redirect_to field in its frontmatter
  2. Getting any existing tags from the post's frontmatter
  3. Appending the "external" tag to the existing tags for linkposts
  4. Including the categories in both RSS and JSON feed formats

This allows feed consumers to programmatically identify external content for filtering or display purposes.

Closes SITE-9

Add support for automatically tagging linkposts (posts with redirect_to field)
with an "external" tag in both RSS and JSON feeds. This allows readers to
perform client-side filtering to identify external content.
@linear

linear Bot commented Nov 1, 2025

Copy link
Copy Markdown

@Xe
Xe merged commit fe0c6c4 into main Nov 1, 2025
3 checks passed
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.

1 participant