Child pages
  • RSS Feed Macro

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
The RSS feed macro embeds an [RSS feed|Working with RSS Feeds] on a page. It can display the contents of external feeds, or of internal feeds generated by Confluence. To display blog posts or to list recently updated pages in a space, use the [Feed Builder|Subscribing to RSS Feeds within Confluence] to create an internal feed, then render it using this macro.

{warning:title=CAUTION: Including unknown HTML inside a webpage is dangerous.}HTML inside an RSS feed can contain active scripting components. This means that it would be possible for a malicious attacker to present a user of your site with script that their web browser would believe came from you. Such code could be used, for example, to steal a user's authentication cookie and give the attacker their Confluence login password.{warning}

The RSS macro will only be available if it has been enabled by your Confluence administrator. Also, your Confluence Administrator can define a [whitelist of trusted URLs|Configuring a URL Whitelist]. You will see an error message on the Confluence page, if the included URL is not in the whitelist.

*On this page:*

h2. Usage with the Macro Browser

{color:#0099cc}*To insert the RSS feed macro into a page using the Macro Browser,*{color}
{panel: borderStyle=dashed| borderColor=#ccc| titleBGColor=#F7D6C1| bgColor= #D5EFFF}
{excerpt-include:Navigating to the Macro Browser|nopanel=true}
Once you've found the RSS feed macro and have added the required parameter values, click '*insert*' to add it to your page.

h2. Usage with the Wiki Markup Editor

Use the Wiki Markup editor to edit the page and insert the RSS macro. Replace the '{nomarkup}{nomarkup}' URL with your own feed link in this example:

h2. Parameters


|| Parameter || Required? || Default || Description ||
| *RSS Feed URL*
({{url}}) | yes | none | The URL of the RSS feed link you want to show. |
| *Maximum Number of Entries*
({{max}}) | no | 15 | Limit the number of entries displayed. |
| *Show Item Titles Only*
({{showTitlesOnly}}) | no | false | Show only the titles of the news items, not the content. |
| *Show Name/Title of RSS Feed*
({{titleBar}}) | no | true | Hide the feeds title bar. |

h2. Examples

h4. 1. Limit the number of entries displayed


h4. 2. Show only the RSS feed titles


h4. 3. Hide the feeds titlebar


h2. Working Example

What you need to type:

What you will get:

h2. How Up to Date is the Feed?

By default, the RSS Feed macro caches the feed results for 60 minutes before fetching the data again.

If you wish to change the default caching, use the \{cache} macro to define how often the RSS Feed macro fetches the feed updates. You may want to set the cache to a longer period, so that your page loads faster. Or you may want to retrieve feed results more often, if you need to see the updates sooner. You will need to install the [Cache plugin page|CONFEXT:Cache Plugin] onto your Confluence site. 

To enable caching:
# Using the [Confluence Repository|Installing and Configuring Plugins using the Universal Plugin Manager], install the 'Scripting Plugin' and the 'Utilities Plugin'.
# For each RSS macro that you wish to cache, surround your RSS macro with a Cache macro. For example, to cache feeds for 30 minutes:
The [Cache plugin page|CONFEXT:Cache Plugin] provides more information on customising the cache behaviour.

h2. What Happens to a Page Containing a Disallowed URL?

Your Confluence Administrator can set up a whitelist of allowed URLs. If this is the case, you may see an error on the pages which contain the RSS macro.

{excerpt-include:_URL Not Allowed|nopanel=true}

h2. Authentication

h5. Adding Login Information for Confluence Feeds

You can [add your Confluence username and password to the feed URL|Adding a username and password to Confluence RSS feeds], so that the RSS Feed Macro can log in to Confluence. 
(!) Please note that if you do this, someone with access to your RSS newsreader configuration can read your password.

h5. Private Feeds from External Sites

RSS feeds which require authentication cannot be accessed using the RSS Macro.

h2. Accessing Internal HTTPS Feeds

This applies only to Confluence instances which have [enabled HTTPS for all content|Running Confluence Over SSL or HTTPS]. If your site is fully HTTPS, the RSS macro cannot access internal feeds. To enable the RSS macro to access internal feeds without affecting your HTTPS setup, enable local-only HTTP access:
# Shut down Confluence.
# Consult the [SSL guide|Running Confluence Over SSL or HTTPS] to enable HTTP access to Confluence. You'll want to ensure that you have an HTTP connector and an SSL connector, both commented in. This means that Confluence will be accessible via both HTTP and HTTPS. However, you should _not_ have a redirect port, nor rules in web.xml to redirect all traffic. 
# Instead of using web.xml to redirect traffic, insert a firewall rule to redirect all HTTP requests not from the Confluence server to the equivalent HTTPS URL. This ensures that users will only be able to access Confluence via HTTPS, as intended. If you have still left HTTP access for attachments enabled (to avoid the [IE download bug|]) you must selectively enable those URLS as well.
# Modify your Confluence RSS macro feed link to use the HTTP URL, and restart Confluence.


[Subscribing to RSS Feeds within Confluence|Subscribing to RSS Feeds within Confluence]
[Adding a username and password to Confluence RSS feeds]
[Tracking Updates to Confluence Pages and Spaces]
[Working with Macros]
[Configuring a URL Whitelist]

Return to the [Wikis Help Guide].