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.

Example

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': 'http://statenews.com',
    }) }}

    {%
        set items = fetch('article')
                    .wherePublished()
                    .limit(10)
                    .find()
    %}

    {% for item in items %}
        {# FB instant can't use the default rssItem handler since it needs to tweak it a bit #}
        <item>
            {{ 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) }}
        </item>

    {% endfor %}

{% endblock %}

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