Skip to content

Instantly share code, notes, and snippets.

@davidhellmann
Created June 26, 2016 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidhellmann/3bfb6a5297aaff5202a840195b431fe7 to your computer and use it in GitHub Desktop.
Save davidhellmann/3bfb6a5297aaff5202a840195b431fe7 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>{{ seomaticSiteMeta.siteSeoName }}</title>
<link>{{ siteUrl }}</link>
<atom:link href="{{ craft.request.url }}" rel="self" type="application/rss+xml" />
<description>{{ seomaticSiteMeta.siteSeoDescription }}</description>
<language>en-us</language>
<pubDate>{{ now.rss }}</pubDate>
<lastBuildDate>{{ now.rss }}</lastBuildDate>
{% for entry in craft.entries.section('blog').limit(10).find() %}
<item>
<title>{{ entry.title }}</title>
<link>{{ entry.url }}</link>
<pubDate>{{ entry.postDate.rss }}</pubDate>
<author>{{ entry.author }}</author>
<guid>{{ entry.url }}</guid>
<description>
<![CDATA[
{{ entry.contentBuilder.type('copy').first().copy }}
{% if entry.contentBuilder.type('gridImage')|length %}
{% set thumb = {
mode: 'crop',
width: 1280,
height: 800,
quality: 80,
position: 'top-center'
} %}
{% set image = entry.contentBuilder.type('gridImage').first().images.first().image.first() %}
<img src="{{ image.getUrl(thumb) }}" width="{{ image.getWidth(thumb) }}" height="{{ image.getHeight(thumb) }}" alt="{{ entry.title }}">
{% endif %}
]]>
</description>
<content>
<![CDATA[
{# start: contenBuilder #}
{% if entry.contentBuilder|length %}
{# Import Macros #}
{% import '_macros/_macros.html' as dh_macros %}
<div class="contentBuilder contentBuilder--blog">
{% set contentBuilderContent = entry.contentBuilder %}
{# contentBuilder Include #}
{% include '_partials/_content/_contentBuilder' %}
</div>
{% endif %}
{# end: contentBuilder #}
]]>
</content>
</item>
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment