Skip to content

Podcast Feeds

The FeedBuilder plugin was not ported from Gryphon to CEO as an interactive plugin. Instead its functionality lives on in the front end system's Feeds plugin template system.

Now the custom feed system is controlled entirely by Twig templates.


Create a new template in the client templates folder called plugins/feeds/fb-instant.twig.

This one is a bit more complex since we can't just use the rssItem macro. We want to use the rssFacebookContent macro, so we need to use each component macro to build the item list.

{% extends 'partials/plugins/feeds/rss-base.twig' %}
{% block channel %}
    {% import 'partials/plugins/feeds/rss-macros.twig' as macros %}
    {% import 'partials/plugins/feeds/facebook-macros.twig' as fbMacros %}

    {{ macros.channelItem({
        'title': 'State News Instant Articles',
        'link': '',
    }) }}

        set items = fetch('article')

    {% for item in items %}
        {# FB instant can't use the default rssItem handler since it needs to tweak it a bit #}
            {{ macros.rssTitle(item.headline) }}
            {{ macros.rssCategories(item.tags) }}
            {{ macros.rssAuthors(item.authors) }}
            {{ macros.rssPubDate(item.published_at) }}
            {{ macros.rssGuid(item.getFriendlyUrl) }}
            {{ macros.rssLink(item.getFriendlyUrl) }}
            {{ macros.rssDescription(item.content) }}
            {{ fbMacros.rssFacebookContent({
                'header': item.headline,
                'content': item.content,
                'url': item.getFriendlyUrl
            }) }}
            {{ macros.rssEnclosure(item.dominantMedia) }}

    {% endfor %}

{% endblock %}

Now, when you hit the url site.tld/plugin/feeds/fb-instant you'll get your Instant Articles feed.