It’s really simple, actually. Open your feed.xml file and add a filter to your site posts.

{% assign posts = site.posts | where: 'exclude_rss', ! true%}

Then in your for loop, change your collection to be this local variable.

{% for post in posts limit:10 %}

Here’s what your feed.xml file will look like once these changes are made, assuming you haven’t changed anything else about it:

layout: null
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="">
    <title>{{ site.title | xml_escape }}</title>
    <description>{{ site.description | xml_escape }}</description>
    <link>{{ site.url }}{{ site.baseurl }}/</link>
    <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
    <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
    <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
    <generator>Jekyll v{{ jekyll.version }}</generator>
    {% assign posts = site.posts | where: 'exclude_rss', ! true%}
    {% for post in posts limit:10 %}
        <title>{{ post.title | xml_escape }}</title>
        <description>{{ post.content | xml_escape }}</description>
        <pubDate>{{ | date_to_rfc822 }}</pubDate>
        <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
        <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
        {% for tag in post.tags %}
        <category>{{ tag | xml_escape }}</category>
        {% endfor %}
        {% for cat in post.categories %}
        <category>{{ cat | xml_escape }}</category>
        {% endfor %}
    {% endfor %}

Now, just add exclude_rss: true at the top of your .markdown file that you’re writing, inside the table of definitions. E.g.

layout: post
exclude_rss: true
title:  "How to Exclude Items from RSS in Jekyll"

I have a free MailChimp account with an active RSS campaign that sends out an email to subscribers whenever I publish a new article; however, lately I’ve been wanting to publish something brief that doesn’t necessarily deserve a dedicated email notification. In situations like this, being able to exclude an article from the RSS feed (what MailChimp listens to) is great.

You could do something similar in any good CMS but it feels extremely lightweight in Jekyll. Really loving this platform.