ExtraStatic: powerful and easy publishing

Skip to content

Add multiple RSS feeds and better tagging

Chris Dawson requested to merge add_multiple_rss into main

Add an element tags: true to the RSS section of _config.yml. If you add this, Svekyll will generate RSS feeds for each tag, which allows your readers to only subscribe to the feed for a certain tag.

rss:
  filename: feed.rss
  link: https://blog.katarismo.com
  tags: true
  include_body: true

A feed for each tag will be generated. For example, if you have tags like linux, wireguard inside your posts, then you will add two new feeds with filenames linux-feed.rss and wireguard-feed.rss.

These are not displayed by default, but you can easily add a tag cloud to each post into the src/Postroll.svelte using the overrides mechanism like this:

<script>
  import config from '$config/config';
  import Tags from '$svekyll/Tags.svelte'
  export let post;
</script>

<Tags rss=true {post}/>
<div class="text-xs italics">Subscribe to RSS by tags if you only want certain types of posts.
  Or, 
  <a href={`/${config.rss.filename}`}>subscribe to all posts</a>.
</div>

This ends up looking like this:

tag-cloud-svekyll

Edited by Chris Dawson

Merge request reports

Loading