Skip to content

Instantly share code, notes, and snippets.

@davidchua
Last active April 24, 2016 03:12
Show Gist options
  • Save davidchua/f0c679f67aed4c2d3c70135aa56422ad to your computer and use it in GitHub Desktop.
Save davidchua/f0c679f67aed4c2d3c70135aa56422ad to your computer and use it in GitHub Desktop.
Facebook Instant Article - Jekyll Feed (FB Compliant) - More Info: http://dchua.com/2016/04/24/hooking-up-jekyll-to-facebook-instant-articles/
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ site.name | xml_escape }}</title>
<link>{{ site.url }}</link>
<description>
{% if site.description %}{{ site.description | xml_escape }}{% endif %}
</description>
{% for post in site.posts | sort 'last_modified_at' %}
{% unless post.link %}
<item>
<title>{{ post.title | xml_escape }}</title>
<link>{{ site.url }}{{ post.url }}</link>
<content:encoded>
<![CDATA[
{{ post.content }}
]]>
</content:encoded>
<guid isPermaLink="false">{{ post.url }}</guid>
<description>
{% if post.excerpt %}
{{ post.excerpt | xml_escape }}
{% else %}
{{ post.description | xml_escape }}
{% endif %}
</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<modDate>{{ post.last_modified_at | date: "%a, %d %b %Y %H:%M:%S %z" }}</modDate>
<author></author>
</item>
{% endunless %}
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment