# RSS feed and HubL

**URL:** <https://community.hubspot.com/t/rss-feed-and-hubl/425>\
**Category:** CMS Development\
**Created:** [November 16, 2016, 5:29pm UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425 "2016-11-16T17:29:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 16, 2016, 5:29pm UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/1 "2016-11-16T17:29:39Z")

</div>

Does anybody know the corred script/format is to use an RSS blog listing in an email?

In the code I have " {% rss\_listing “rss\_listing” %} " but it renders strangely in the email (I can’t change the width, font colour etc). Does anyone know how I can format this? I feel like it should be like html coding, but my trial and error isn’t working.

---

<div class="post-metadata">

**Author:** ![roisinkirby](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@roisinkirby](https://community.hubspot.com/u/roisinkirby)\
**Post date:** [November 16, 2016, 5:48pm UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/2 "2016-11-16T17:48:36Z")

</div>

Hey @Gonzalo is this something you’ve come across before? I’ve noticed you’ve had some great contributions r.e. HubL. I’ll also follow up with designers on HubSpot’s side @Anonymous 🙂

---

<div class="post-metadata">

**Author:** ![Gonzalo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gonzalo/32/106671_2.png) [@Gonzalo](https://community.hubspot.com/u/Gonzalo)\
**Post date:** [November 16, 2016, 8:13pm UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/3 "2016-11-16T20:13:50Z")

</div>

Hi!  
Thanks @roisinkirby :).

I haven’t worked too much with emails but I can imagine that you can’t edit the HTML output from the RSS module. You can add custom CSS to improve the design but this isn’t the best way because a lot of email readers (gmail for example) don’t use classes, just inline-style.

So my advice is to use HubL functions (instead of modules) to manage the HTML output and the CSS at the same time. For example:

```auto
{% set posts = blog_recent_posts('default', 5) %}<table style="width:100%;border:1px solid;padding:2rem;background:#c1c1c1;color:#666;">
{% for post in posts %}
 <tr> <h2><a href="{{post.absolute_url}}" style="font-size:1.5rem;color:#666">{{ post.name }}</a><h2> <div>{{post.summary}}</div> </tr>{% endfor %}</table> 

```

More documentation [here](http://designers.hubspot.com/en/docs/hubl/hubl-supported-functions#blog-recent-posts).

You can insert this directly in the content block, but usually I like to have everything ordered so you can add a HubL block to your template and customize your code there 😉

I hope this could help you! 🙂  
Regards,  
Gonzalo

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 25, 2016, 11:07am UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/4 "2016-11-25T11:07:45Z")

</div>

Super helpful for my colleague - thank you @Gonzalo. You’ve had some great insights on this forum 🙂

---

<div class="post-metadata">

**Author:** ![KeithMon](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/keithmon/32/66396_2.png) [@KeithMon](https://community.hubspot.com/u/KeithMon)\
**Post date:** [October 11, 2018, 8:29pm UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/5 "2018-10-11T20:29:22Z")

</div>

Hi @Gonzalo,

I’m also trying to do this but I’m not getting it to work. Like aoifemoon, I also tried {% rss\_listing “rss\_listing” %}. That worked but I was unable to rearrange content how I want it. I’m trying to add an external RSS feed to a custom module so I can place it into a Drag-and-Drop email template.  
I’ve tried blog\_recent\_posts() using your example and it worked for Hubspot blogs but I have an external RSS feed. Do you know if this function works with external RSS feeds?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Gonzalo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gonzalo/32/106671_2.png) [@Gonzalo](https://community.hubspot.com/u/Gonzalo)\
**Post date:** [October 12, 2018, 11:13am UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/6 "2018-10-12T11:13:24Z")

</div>

Hey @KeithMon,  
I don’t think blog\_recent\_posts works with external blogs (just hubspot hosted).

So the only solution I have find out and we use for our clients is use the default RSS function, and customize the external RSS with the right marktup that you want to us (because I don’t think you can edit the RSS marktup content within HubL).

In my case, we have setup in our server a service where we have some posibilities to customize the RSS in may ways, then it output the right marktup for the HS RSS reader. But of course is a premium service to offer to the clients, and not all of them want it.

---

<div class="post-metadata">

**Author:** ![KeithMon](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/keithmon/32/66396_2.png) [@KeithMon](https://community.hubspot.com/u/KeithMon)\
**Post date:** [October 12, 2018, 12:18pm UTC](https://community.hubspot.com/t/rss-feed-and-hubl/425/7 "2018-10-12T12:18:09Z")

</div>

That’s what I was afraid of. Thanks for the info.
