Is there a way of showing the page summary in the Feed?

I noticed that the Feed plugin ignores the page summary and truncates the content of the feed to a fixed length. Is there a way to get it to show the page summary (if it exists) instead or you have to modify the plugin in order to do it? And if you have to modify it, is there something like inheritance for plugins too?

The feed plugin has a default length set in it’s feed.yaml file. You can override this by copying the file into your user/config/plugins/ folder (create it if need be), and then modifying it. You can of course modify the template too.

The feed plugin provides it’s own twig template to render the feeds. however, all you have to do is copy them to your current template and modify them.

For example, look in the user/plugins/feed/templates/ folder and you will find: feed.atom.twig and feed.rss.twig. Simply copy the files you want to modify to your user/themes/antimatter/templates/ folder (or whatever theme your using) and then make the modifications.

For reference the .atom file looks like this by default:

{% set collection = collection|default(page.collection) %}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>{{ page.title }}</title>
    <link href="{{ uri.url(true) }}.{{ uri.extension() }}" rel="self" />
    <subtitle>{{ collection.params.description }}</subtitle>
    <updated>{{ collection|first.date| date("Y-m-d\\TH:i:sP") }}</updated>
    <author>
        <name>{{ site.author.name|default("Grav User") }}</name>
    </author>
    <id>{{ uri.rootUrl(true) }},{{ uri.route() }}</id>
    {% for item in collection %}
    {% set banner = item.media.images|first %}
    <entry>
        <title>{{ item.title|e }}</title>
        <id>{{ item.url(true) }}</id>
        <updated>{{ item.date|date("Y-m-d\\TH:i:sP") }}</updated>
        <published>{{ item.date|date("Y-m-d\\TH:i:sP") }}</published>
        <link href="{{ item.url(true) }}"/>
        {% for tag in item.taxonomy.tag %}
        <category term="{{ tag|lower }}" label="{{ tag|capitalize }}" />
        {% endfor %}
        <content type="html">
            {% if banner %}
            {{ banner.cropZoom(600,400).html|e }}
            {% endif %}
            {{ item.content|striptags|truncate(collection.params.length)|e }}
        </content>
    </entry>
    {% endfor %}
</feed>

You might want to replace the {{ item.content.... line with something like:

{{ item.summary|striptags|e }}

Thanks a lot! I had already created the feed.yaml in my user/config/plugins/ folder but I had no idea I could just copy the feed.atom.twig and feed.rss.twig directly into my themes templates folder and it would work!!! I am going to do it right away :D! (I still have lots to learn since it’s my 10th day using Grav…). BTW, I really like Grav so far. You guys are doing a great job! Thanks a lot!