Skip to content

shevky/plugin-rss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shevky Plugin: RSS

Generate RSS 2.0 feeds for Shevky sites. The plugin scans content files, applies RSS filters, builds feed items, and writes feed.xml to the dist folder (and per-language feeds when i18n is enabled).

Features

  • Builds feed.xml during content:ready
  • Supports multilingual feeds (/tr/feed.xml, etc.)
  • Uses post title, description, dates, categories, and tags
  • Adds Atom self/alternate links and basic metadata
  • Supports schema/category-based filtering via plugin config

Installation

npm i @shevky/plugin-rss

Usage

Add the plugin to your config:

{
  "identity": {
    "url": "https://example.com",
    "author": "Jane Doe",
    "email": "jane@example.com"
  },
  "pluginConfigs": {
    "shevky-rss": {
      "feedFilename": "feed.xml",
      "feedTtl": 1440,
      "feedItemCount": 50,
      "includedSchemaTypes": ["post", "job-post"],
      "includedCategories": ["engineering", "career"]
    }
  },
  "plugins": [
    "@shevky/plugin-rss"
  ]
}

The feed will be generated at:

dist/feed.xml

With i18n enabled, each language gets its own feed:

dist/tr/feed.xml
dist/en/feed.xml

To enable i18n feeds, configure content.languages in site.json:

{
  "content": {
    "languages": {
      "default": "tr",
      "supported": ["tr", "en"]
    }
  }
}

The feed output path is derived from each language’s canonical URL in content.languages.canonical. If a canonical base is set for a language, the feed URL follows it (e.g. /en/ -> /en/feed.xml).

Config Options

  • feedFilename: Output file name (default: feed.xml)
  • feedTtl: RSS TTL value in minutes (default: 1440)
  • feedItemCount: Max items per feed (default: no limit)
  • includedSchemaTypes: Schema type allow-list. Default is ["post", "job-post"]. If provided, only listed schema types are included.
  • includedCategories: Optional category allow-list. If provided, only listed categories are included after schema filtering.

Filtering Rules

  1. isPublished must be true (always required).
  2. schemaType must match includedSchemaTypes.
  3. If includedCategories exists, category must match this list.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors