Permalink
Browse files

fb instant articles integration

  • Loading branch information...
1 parent 0899d86 commit 6517fad8989130df574124bc2e40beac797a1f86 Andrea Margiovanni committed Jul 24, 2016
Showing with 41 additions and 0 deletions.
  1. +5 −0 _config.yml
  2. +1 −0 _includes/head.html
  3. +35 −0 fb-instant-articles.xml
View
@@ -26,6 +26,11 @@ enable_mathjax: false
extended_fonts: false
enable_anchorjs: false
+# Facebook Page integration
+# (for instant articles and other stuff)
+fb_page: true
+fb_page_id:
+
# Disqus post comments
# (leave blank to disable Disqus)
disqus_shortname:
View
@@ -10,6 +10,7 @@
{% if page.meta_robots %}<meta name="robots" content="{{ page.meta_robots }}">
{% else %}<meta name="robots" content="all">{% endif %}
<meta name="author" content="{{ site.author }}">
+ {% if site.fb_page %}<meta property="fb:pages" content="{{ site.fb_page_id }}" />{% endif %}
{% if page.categories %}<meta name="keywords" content="{{ page.categories | join: ', ' }}">{% endif %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="RSS Feed for {{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl }}" />
@@ -0,0 +1,35 @@
+---
+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 %}
+ {% 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.summary %}
+ {{ post.summary | xml_escape }}
+ {% endif %}
+ </description>
+ <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
+ <author>{{ site.author }}</author>
+ </item>
+ {% endunless %}
+ {% endfor %}
+ </channel>
+</rss>

0 comments on commit 6517fad

Please sign in to comment.