Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

How to create the perfect RSS feed with Drupal 10 or Drupal 11

Parent Feed: 

Update: I've checked and updated this tutorial so that it works on a Drupal 10 or Drupal 11 website. It should still work for Drupal 8 and Drupal 9 as well. Please let me know in the comments if you have any troubles in either Drupal version.

Before we start

In this example I will show nodes in a RSS feed of the ‘Article’ content type, which I’ve already created. This article content type contains an Image field (learn how to efficiently reuse your image fields) and a Summary field of the type Text (formatted, long). I prefer using a separate Summary field instead of the default Body with the built in summary option, because this gives me more flexibility.  

It’s also highly advisable to install the Publication Date module. This will add an extra field to your content type containing the date the node was actually published. You will need this date to correctly display nodes in a feed.

You can also use the creation date, but this might not always be the date stamp you want your nodes to have. If, for example, you’ve started a draft and finally publish the node a few days or weeks later, the creation date will lag behind the actual publish date. This can mess up the way your articles are displayed in an aggregator such as Planet Drupal.

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web