GHOST default RSS is not fully compatible with Facebook Instant articles, so I created a one

My News website is running with Ghost and the default RSS feed was not fully compatible with Facebook Instant articles. Therefore every time I have to edit production articles to include the following.

  1. op-ad
  2. fb:use_automatic_ad_placement
  3. Google Analytics integration
  4. op-kicker
  5. Author

And there were some more changes that I have to done. I have done this for few days and I decided to create a custom RSS feed that fully supports Facebook Instant Articles. So I studied a few WordPress websites’ RSS feeds that have Instant Article approval. After that, I created my custom RSS feed and it worked.

Now I came here to share it with you.

<rss xmlns:dc="" xmlns:content=""
    xmlns:atom="" xmlns:media="" version="2.0">
        <title>{{@site.title}} </title>
        <lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
        <atom:link href="{{@site.url}}" rel="self" type="application/rss+xml" />

        {{#get "posts" limit="15" include="authors,tags"}}
        {{#foreach posts}}
                <![CDATA[ {{title}} ]]>
            <link>{{url absolute="true"}}</link>
                <![CDATA[ {{excerpt}} ]]>
                            <link rel="canonical" href="{{url absolute=" true"}}" />
                            <meta charset="utf-8" />
                            <meta property="op:generator" content="facebook-instant-articles-sdk-php" />
                            <meta property="op:generator:version" content="1.10.0" />
                            <meta property="op:generator:application:version" content="4.2.1" />
                            <meta property="op:generator:transformer" content="facebook-instant-articles-sdk-php" />
                            <meta property="op:generator:transformer:version" content="1.10.0" />
                            <meta property="op:markup_version" content="v1.0" />
                            <meta property="fb:use_automatic_ad_placement" content="enable=true ad_density=default" />
                            <meta property="fb:article_style" content="default" />
                            <meta property="fb:use_automatic_ad_placement" content="enable=true ad_density=default">

                                    <figure><img src="{{feature_image}}" alt="{{title}}"></figure>
                                    <h3 class="op-kicker">{{}}</h3>
                                    <meta property="fb:use_automatic_ad_placement" content="enable=true ad_density=default">
                                    <figure class="op-ad"><iframe
                                            width="300" height="250"></iframe></figure>
                                <figure class="op-tracker">

            <guid isPermaLink="false">{{id}}</guid>
            <pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>


You have to do is follow the Custom RSS + Ghost guide and replace my RSS code.

Audience Network Ad tag Sample
You can find PLACEMENT_ID at your Facebook Audience network. Please replace it to show ads in your Instant articles.

<figure class="op-ad">
  <iframe width="300" height="250" style="border:0; margin:0;" src=""></iframe>

Google Analytics
Add your Google Analytics tracking code for TRACKING_CODE

<figure class="op-tracker">

That’s all. If you want to look at my Instant article RSS, please visit

I would like to invite Ghost creators to add this as another RSS feed that supports Facebook Instant articles because if someone tries to get Instant Article approval using {{site.url}}/rss, he/she have to do some work to correct production articles. If you can add this as another RSS feed like, {{site.ur}}/feed/instant-articles it will be very easy to Ghost beginners.

1 Like

Awesome! Thanks for sharing, I think someday I will need this :grinning_face_with_smiling_eyes:

1 Like

Hope you will do it better. If you need a help, please tell me.

1 Like