BlakePlugin.RSS 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlakePlugin.RSS --version 1.0.0
                    
NuGet\Install-Package BlakePlugin.RSS -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlakePlugin.RSS" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlakePlugin.RSS" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BlakePlugin.RSS" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlakePlugin.RSS --version 1.0.0
                    
#r "nuget: BlakePlugin.RSS, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlakePlugin.RSS@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlakePlugin.RSS&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BlakePlugin.RSS&version=1.0.0
                    
Install as a Cake Tool

Blake RSS Feed Plugin (MVP Spec)

This plugin generates an RSS feed for your Blake site with zero configuration.

How it works

  • You add a template file: wwwroot/feed.template.xml
  • The plugin reads this template, duplicates the <item> seed inside <Items>…</Items> for each post in your content index, replaces placeholders, and writes the output to wwwroot/feed.xml.

Setup

  1. Add a template:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>{{Title}}</title>
    <link>{{Link}}</link>
    <description>{{Description}}</description>
    <lastBuildDate>{{LastBuildDate}}</lastBuildDate>

    <Items>
      <item>
        <title>{{Item.Title}}</title>
        <link>{{Item.Link}}</link>
        <guid isPermaLink="true">{{Item.Guid}}</guid>
        <pubDate>{{Item.PubDate}}</pubDate>
        <description><![CDATA[{{Item.Description}}]]></description>
        {{Item.CategoriesXml}}
        {{Item.ContentEncoded}}
      </item>
    </Items>
  </channel>
</rss>
  1. Update your csproj so the template isn’t served directly:
<ItemGroup>
  <None Include="wwwroot\feed.template.xml" />
  <Content Remove="wwwroot\feed.template.xml" />
</ItemGroup>
  1. Install the NuGet package for the plugin.

That’s it - call blake bake and the plugin generates wwwroot/feed.xml.

Placeholders

Channel level

  • {{Title}} → Site title
  • {{Link}} → Base URL (must be provided with CLI arg if not in template)
  • {{Description}} → Site description
  • {{LastBuildDate}} → Current bake time (RFC 1123)

Item level

  • {{Item.Title}}
  • {{Item.Link}} (absolute URL)
  • {{Item.Guid}} (permalink or stable hash)
  • {{Item.PubDate}} (RFC 1123 UTC)
  • {{Item.Description}}
  • {{Item.CategoriesXml}} → <category>…</category> tags from metadata
  • {{Item.ContentEncoded}} → full HTML (if present in template)

CLI arguments

You can replace or inject any token via CLI:

blake bake --rss:BaseUrl=https://example.com --rss:Title="My Blog"

Even custom tokens work:

--rss:cabbageId=x45Rg2   → replaces {{cabbageId}} anywhere in the template

Arguments are passed to all plugins via BlakeContext so this plugin can just look for anything matching this pattern.

Behavior

  • If a required placeholder has no value, the bake fails with a helpful error.
  • Posts are ordered newest → oldest (default 20 items).
  • All links are absolute.
  • Valid RFC 1123 dates.

Placeholder resolution order

When the plugin encounters a {{Token}}, it looks for a value in this order:

  1. CLI argument If you pass --rss:BaseUrl=https://example.com, it replaces {{BaseUrl}} or {{Link}} directly.

CLI always wins at the channel level, since it’s the most explicit.

  1. PageModel properties For item-level placeholders ({{Item.Title}}, {{Item.Description}}, etc.), the plugin first looks at strongly typed properties on the page/post model (Title, Description, PublishedUtc, Slug, Tags, Html).

  2. PageModel.Metadata dictionary If not found as a property, the plugin checks metadata (e.g. author, summary, audioUrl). This allows arbitrary keys to be surfaced without config.

  3. Default/derived values For some fields the plugin derives sensible defaults:

  • Item.Guid → defaults to the permalink (BaseUrl + slug)
  • Item.Link → always BaseUrl + slug
  • Item.PubDate → defaults to Date (from the PageModel) in RFC 1123 UTC
  1. Fail fast If the token is still unresolved and appears in the template, the bake fails with a clear message:
RSS plugin error: Missing value for {{BaseUrl}}.
Checked CLI (--rss:BaseUrl), then PageModel.Metadata["BaseUrl"].
Provide a CLI argument or add a value to the template.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 151 9/1/2025
1.0.6 146 8/22/2025
1.0.5 129 8/21/2025
1.0.4 125 8/18/2025
1.0.3 135 8/18/2025
1.0.0 133 8/18/2025