RebelMouse Talk to Us
hummingbird feeding

Create Custom Feeds With RebelMouse Feed Builder

We recently introduced our Custom Feed Builder that allows you to create and edit RSS, JSON, and Atom feeds. In this article, we go into the process of creating and editing feeds in much greater detail. By following the directions in this post, you will be able to create custom feeds to match your specific requirements.


Dashboard

The first step is to access the Feed Builder. You can reach this dashboard by appending the following to your site's URL:

r/dashboard/feed_builder

From here you can see various details about the feeds that have already been generated:

custom feed dashboard
  • Name: The name of the feed. The name of the feed is used in the feed URL (e.g., {site_domain}/customfeeds/feed/archive_wellness_library/json)
  • Basic Authentication (Optional): If the feed has a base auth enabled in this column, we will show a password that is colon separated: {user}:{password} (e.g., wellness:library)
  • Errors: If there are any errors in the feed, the errors will be listed in this column
  • Get Feed URL: The links to all the feed formats (e.g., JSON, RSS, Atom, XML) can be accessed by clicking the download arrow icon
  • Edit: Click the pencil icon if you need to edit a feed
  • Delete: Allows you to remove a feed permanently from the system

How to Create a Feed

To add a new feed, click the ⨁ icon in the bottom right-hand corner. From there, you can enter your feed's name, code, and desired template. Within edit mode, you can also add basic access authentication, and even preview the feed before it goes live.

custom feed example
  • Feed Name: Because this string is used in the feed URL, it is best to avoid special characters and quote or double quote symbols
  • Templates: These are the default templates that are available:
    • Simple Feed
    • Simple RSS Feed
    • Atom Feed
    • SmartNews Feed
  • Text Editor: We use GraphQL code for building feeds
  • Format: Select a format from the drop-down menu and the preview of the feed will be loaded
    • The feed is always available in all formats
    • The drop-down menu has been designed for previewing the feed only; editing is not available in this view
  • Basic Authentication: Name/Password is entered here

Common Fields

Here is the list of the most common fields:

// post ID:

ID: postFieldAsAttribute(field: ID)

// post DATE:

POSTING_DATE: dateAsAttribute(format: "DD-MMM-YYYY")

// post CUSTOM FIELD:

NEWS_TYPE: postField(field:CUSTOM_FIELD_NAME)

// post HEADLINE:

HEADLINE: postField(field: HEADLINE)

// post SUBHEADLINE with default value:

SUBHEADLINE: postField(field: SUBHEADLINE, defaultValue: " ")

// post BODY:

BODY: postField(field: BODY)

// post URL:

URL: postField(field: POST_URL)

// post MEDIA:

FEATURE_IMAGE: postField(field: IMAGE180X135)

// New Date():

NOW_DATE: printNow(format: "ddd, DD MMM YYYY HH:mm:ss ZZ")

How to Order Posts by Pageviews and Date

Sometimes you might want to order your feed by the most popular posts for a particular time range. You can easily add this information to your feed with the following:

{
2  findPostsBySearch(filters: {
3      order_by: POPULARITY,
4      order_by_period_in_days: 7,
5      ...
6    }
7  ){
8  ...
9  }
10}

Note that there are some specific limitations when it comes to ordering by pageviews:

  • Pageviews ordering does not work with:
    • Types Filter
    • Authors Filter
    • Tags Filter
  • Pageviews ordering works in a limited capacity with:
    • IDs Filter (only exclusion)
    • Statuses Filter (phasing)
    • Sections Filter (phasing when there is more than one included section, or has excluded sections, or order_period = lifetime)
    • Period Filter (phasing)

How to Print a Static String

Sometimes you need static content in the feeds. All you need to do is print the same content in every item/article. For instance, you may need to have copyright information applied to each post.

Here is the method you need to use:

COPYRIGHT: print(content: "The string you want to use and <a href=\"http://www.google.com/\" target=\"_new\">Link</a>")

Result (RSS):

<COPYRIGHT>
<![CDATA[ The string you want to use and <a href="http://www.google.com/" target="_new">Link</a> ]]>
</COPYRIGHT>

How to Nest Elements and Attributes

In the feeds, it's possible to nest elements/tags and attributes. In the following example, the URL attribute is nested in the media:thumbnail:

<media:thumbnail url="https://assets.rebelmouse.io/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbWFnZSI6Imh0dHBzOi8vYXNzZXRzLnJibC5tcy8yNjAyMjQ5MC9vcmlnaW4ucG5nIiwiZXhwaXJlc19hdCI6MTY1MjgyMTU5NH0.wsh0x7h3iTvsdlqSGWM13fPmvk7rw6fip8UXj4ord-w/img.png?width=300&coordinates=271%2C0%2C0%2C0&height=300"/>

Here is the GraphQL code we need to nest an element as an attribute:

media__thumbnail: nest {
     url: postFieldAsAttribute(field: IMAGE300X300)
   }

In the following case instead, the element snf:adcontet is nested in the tag snf:advertisement:

<snf:advertisement>
   <snf:adcontent>
       <![CDATA[ <div id='W183143'data-widget-placementdata-widget-host='habitat'data-endpoint='trends.netizen.co'data-widget-id='183143'></div><script src='https://assets.netizen.co/master/delivery.js' defer='defer'></script> ]]>
   </snf:adcontent>
</snf:advertisement>

This is the code you need to nest elements:

snf__advertisement: nest {
     snf__adcontent: print(
       content: "<div id='W183143'data-widget-placementdata-widget-host='habitat'data-endpoint='trends.netizen.co'data-widget-id='183143'></div><script src='https://assets.netizen.co/master/delivery.js' defer='defer'></script>"
     )
   }

How to Get Section Content Tags ID

The code below gets the content tag ID of the primary section of the post and generates the following name value pair:

<PARENT:SECTION>
    <SUB:SECTION CONTENT_TAG_ID="content_tag"/>
</PARENT:SECTION>
     PARENT_SECTION: postSections {
           SUB_SECTION: sectionTag {
               CONTENT_TAG_ID: printTagAsAttribute(toUppercase: true, trim:      true)
           }
       }

Conditional Content/Filter

The code below filters the sub section of a specific parent section and prints the title of the subsection enabled:

   PARENT_SECTION: postSections(filter: [{
       and: [{
          variableName: "parentId",
          operation: EQUAL_TO,
          value: "PARENT_SECTION_ID"
       }]
   }]) {
          SUB_SECTION: sectionField(field: TITLE)
   }

The code below checks if the user has the custom field is_raw_video set to true. If the condition is true, VIDEO_URL, VIDEO_TEXT, and VIDEO_IMAGE will be added to the feed:

  condition: {
     enviroment: [{
         and: {
             variableName: "is_raw_video",
             operation: EQUAL_TO,
             value: "true"
         }
     }]
  }) {
     VIDEO_URL: postMediaSource {
        mediaSourceField(field: DIRECT_URL)
     }
     VIDEO_TEXT: postField(field: VIDEOTEXT)
     VIDEO_IMAGE: postField(field: IMAGE1200X800)
 }

It's possible to filter the content of the feed by dates as well. All you need to do is to use date_from and date_to in the filters:

{
 ARTICLE: postsBySearch(
   filters: {
     include_sections: [CONSUMER_NEWS_IN_SPANISH]
     date_from: "2019-10-27 07:00:00"
     date_to: "2020-11-04 07:00:00"
   }
 ) {
   ID: postFieldAsAttribute(field: ID)
   . . .

Include/Exclude Sections

You can choose to either include or exclude specific sections. The code below shows how this is done:

{
 ARTICLE: postsBySearch(filters: {
     include_sections: [DOG],
     exclude_sections: [PUG, FRENCH_BULLDOG]  })
 {
   FEED CONTENT HERE
 }
}

How to Append Fields

For example, you may want to append the ID of each article, or a UTM parameter, to its URL. There are two methods for this:

concatPostFields(fields: [MEDIA_HTML, BODY])
idUrl: print(content: "{URL}-{ID}", replaceWithContent: [
       {find: "{URL}", replace: POST_URL},
       {find: "{ID}", replace: ID}
     ])

How to Add a Character

In the following example, we are using nameReplacer to add a colon to the variable:

{
 siteInfo(nameReplacer: {
   find: "__",
   replace: ":"
 }){
       title: print(content: "Title")
   link: print(content: "URL")
   lastBuildDate: printNow(format: "ddd, DD MMM YYYY HH:mm:ss ZZ")
   xmlns__content: printAsAttribute(content: "http://purl.org/rss/1.0/modules/content/")
   xmlns__dc: printAsAttribute(content: "http://purl.org/dc/elements/1.1/")
   xmlns__media: printAsAttribute(content: "http://search.yahoo.com/mrss/")
 },
 item: postsBySearch(
   filters:{include_sections: CONSUMER_NEWS},
   nameReplacer:{
   find: "__",
   replace: ":"
 }){
   title: postField(field: TITLE)
   link: postField(field: POST_URL)
   pubDate: date(format: "ddd, DD MMM YYYY HH:mm:ss ZZ")
   dc__creator: postAuthor{
     authorField(field: TITLE, , defaultValue: " ")
   }
   description: postField(field: SUBHEADLINE)
   content__encoded: concatPostFields(fields: [MEDIA_HTML, BODY])
   media__thumbnail:postField(field: IMAGE600X400, , defaultValue: " ")
 }
}

If you need any additional help, or require assistance to set up a custom feed, please contact your account manager or email support@rebelmouse.com.

Why RebelMouse Is the Best Content Marketing Platform

RebelMouse is a unique platform and company. The company was founded on the vision that media companies would need an always-modern solution to thrive in the new connected internet, and that brands would have to behave like new media companies and use the same platforms.

Keep reading... Show less

Why Premium Creative Agencies and CTOs Choose to Develop on RebelMouse vs. WordPress and Drupal

The Intersection of Design and Development: Where Your Clients Thrive

We started RebelMouse seven years ago knowing that there was a fundamental design flaw in the world of traditional CMSs: Every instance, on every platform, had to be updated independently. It's similar to an era when users had to manage their own Microsoft Exchange Server for email. The costs of managing, maintaining, and iterating on a CMS to keep it awesome and world class is typically a $10 million-a-year endeavor. But even then, these cost-prohibitive CMSs are still behind the times.

Keep reading... Show less

Native Multivariate Testing at Scale With RebelMouse

What Differentiates Our Approach

There are many popular tools that allow you to perform experiments and A/B tests on your users — primarily Google Chrome Experiments and Optimizely. But all of these solutions are JavaScript additions to your web page that sidestep the problem of old, outdated, and clumsy CMSs. These solutions work by calling on a third-party JavaScript library that rewrites a page after it's rendered. This approach adds extra page weight and creates strange user experiences due to having to wait for everything to load and be rewritten on the fly.

At RebelMouse, we've solved this in a very elegant way. At the core level of our platform, we can natively render different layouts and track the exact differences in performance when comparing a test to your other layouts.

Keep reading... Show less

Modern E-Commerce: Blur the Line Between Content and Design

Create Modular + Reusable Design Patterns on RebelMouse

Content saturation is an industry-wide problem, and the e-commerce space is no exception given that it's filled with big brands, small Etsy stores, and everyone in between all fighting for similar audiences. The best way to fight this symptom is to understand your audience and provide them with what they want.

Keep reading... Show less

Instagram-style E-commerce Features on RebelMouse

Revolutionizing e-commerce on RebelMouse

Whether you're a brand with a blog or a media company with a site, driving purchasing behavior and building an audience that uses your content to find things they love to buy is vital. We're very proud to have built out the same functionality that everyone is now used to on Instagram, with layovers on images that lead to products with attribution.

Keep reading... Show less

Building Premium Communities and User Journeys on RebelMouse

RebelMouse is much more than just a replacement for a traditional CMS. Our platform is a tremendous community-building experience. Today's social ecosystem has given us a seemingly limitless number of premium creators who understand how to create gorgeous and relevant content that drives the growth of their own audiences. These creators and influencers are either experts in certain topics, or heavily engaged in targeted content that drives their interests. They're not only consuming the content they're passionate about, but they're contributing to the conversation, too. The new role of the editor is not just to cover the most important topics and people around their expertise, but also to invite those preferred influencers into their community and get them to participate in creating premium content.

Keep reading... Show less

Dynamic Voting: Grow Traffic and Engagement Organically

Help your audience find its voice.

Creating quality content is no longer on marketers alone. We live in a universe of creators who are willing to not only consume content that resonates, but play a role in the creation, promotion, and conversations surrounding it.

Since the start of RebelMouse, we've been on a journey to create dynamic media that is easier for content creators to curate and amplify on social. It's why we've built an online engagement platform centered around the power of communities that thrive naturally in the digital ecosystem.

Keep reading... Show less

How to Monetize Your Website in Today’s Publishing Environment

In order to define distributive publishing, we have to ask the following question: If you have quality content, but nobody sees it, does it even exist? The answer is no, because your content needs to be supported in a way that lets it move seamlessly across all channels, especially site, search, and social. But let's take this question a step further: If you can't monetize your content to generate the support it needs, how do you create quality content in the first place?

Keep reading... Show less

RebelMouse Q3 2021 Platform Performance Updates

For many publishers and brands, Q3 2021 was about recovering web traffic lost to Google's page experience signals update that was rolled out over the summer. For us, the quarter was about continuing our success of delivering excellent Core Web Vitals metrics across our site network with platform performance updates both big and small.

As a globally distributed team, it's important for us to remain transparent about how we're able to power some of the best-performing sites on the open web. And while we're already looking forward to closing out the year stronger than ever before, here's a detailed look back at our accomplishments in Q3 2021.

We invested 1,946 hours into our platform in Q3 2021 alone, and all of the sites on our platform benefited from the work in various ways. Here are the key areas that we focused on:

  • 184 hours were spent on delivering new features
  • 1,010 hours were spent on improving existing features
  • 752 hours were spent on performance and infrastructure updates
Keep reading... Show less

RebelMouse Clients See Performance Improvement After AMP Optimization

Performance is a major pillar of our platform, which means we are always making changes — both big and small — to improve page speed. Our focus on fast websites isn't platform specific, either. We want to make sure that users have a top-notch experience however they view your content, and this includes our integration with Google's AMP format.

Our team of traffic-obsessed developers recently implemented some performance optimizations to enhance our platform's integration with AMP, and that has improved the average response time for our clients. This means that users are able to access your AMP pages more quickly, which, in turn, improves your site's traffic from Google.

Here's a breakdown of the changes we've made:

Keep reading... Show less

Keep Search a Priority With SEO-Friendly Image Filenames

There are a lot of factors that go into a successful search engine optimization (SEO) strategy, including performance, structured data, and, of course, choosing the right keyword(s). Our proprietary search technology helps content creators prep every article for success on search. This all-encompassing approach includes the use of SEO-friendly image filenames.

On RebelMouse, if you assign an alt tag to an image in Entry Editor, that alt tag will also become the image's file name. Briefly, alt tags describe images for search engines, and also allow people using screen readers to know what the image is without actually being able to see it. Adding your desired search phase to every alt text field, and in turn every image file name, will reinforce its relevance to Google's crawler, bringing you one step closer to the top of search returns.

Keep reading... Show less
Subscribe to Our Newsletter