Skip to content

Instantly share code, notes, and snippets.

@heyjones
Last active November 6, 2018 19:42
Show Gist options
  • Save heyjones/990e88b8afa6ca01e00da4fccb61c819 to your computer and use it in GitHub Desktop.
Save heyjones/990e88b8afa6ca01e00da4fccb61c819 to your computer and use it in GitHub Desktop.
ProtoChimp
{% layout none %}<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<atom:link href="{{ shop.url | append: blog.url }}?view=protochimp" rel="self" type="application/rss+xml" />
<title>
{{ blog.title | append: ' | ' | append: shop.name | escape }}
</title>
<description>
{{ shop.description | escape }}
</description>
<link>
{{ shop.url | append: blog.url }}
</link>
<lastBuildDate>
{{ blog.articles.last.created_at | date: "%a, %d %b %Y %H:%M:%S %Z" }}
</lastBuildDate>
{% for article in blog.articles limit: 10 %}
<item>
<title>{{ article.title | escape }}</title>
<link>{{ shop.url | append: article.url }}</link>
<guid>{{ shop.url | append: article.url }}</guid>
<pubDate>{{ article.created_at | date: "%a, %d %b %Y %H:%M:%S %Z" }}</pubDate>
{% unless article.tags == blank %}
<category>{{ article.tags | join:', ' | escape }}</category>
{% endunless %}
<description>{{ article.excerpt | strip_html | escape }}</description>
<content:encoded><![CDATA[{{ article.content | replace: 'src="//cdn.shopify.com/', 'src="https://cdn.shopify.com/' | remove:'<![CDATA[' | remove:']]' }}]]></content:encoded>
<dc:creator>{{ article.author | escape }}</dc:creator>
{% if article.image %}
<media:content type="image/*" url="https:{{ article.image | img_url: 'grande' }}" />
{% endif %}
</item>
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment