Confluence Docs 3.0 : RSS Feed Macro This page last changed on Jun 03, 2009 by ggaskell. The RSS feed macro embeds an RSS feed 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 to create an internal feed, then render it using this macro.
| 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.
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. You will see an error message on the Confluence page, if the included URL is not in the whitelist. On this page: Usage with the Macro Browser Usage with the Wiki Markup Editor Parameters Examples 1. Limit the number of entries displayed 2. Show only the RSS feed titles 3. Hide the feeds titlebar Working Example How Up to Date is the Feed? What Happens to a Page Containing a Disallowed URL? Authentication Accessing Internal HTTPS Feeds ## Usage with the Macro Browser To insert the RSS feed macro into a page using the Macro Browser, Open your desired Confluence page, then click the 'Edit' button. The 'Edit Page' mode opens. Next, click the Macro Browser icon on the editor toolbar. The Macro Browser will open in the middle of the screen. In the Macro Browser, type the name of your desired macro into the search box at the top right of the window. Macros with a matching name will appear in the centre pane. Click on the desired macro to see its options screen. Here, you can set the macro parameters then click 'insert' to put the macro into the page. Once you've found the RSS feed macro and have added the required parameter values, click 'insert' to add it to your page. ## Usage with the Wiki Markup Editor Use the Wiki Markup editor to edit the page and insert the RSS macro. Replace the 'http://www.example.com/rss/' URL with your own feed link in this example:
    {rss:url=http://www.example.com/rss/}
## Parameters Parameters are settings for Confluence macros that allow the user to control their content or presentation. The table below lists relevant parameters for this macro. Parameter names are displayed differently in the macro browser interface and in wiki markup. Below, parameter names used in the macro browser are indicated in Bold text, while their equivalents in wiki markup are indicated in (`bracketed`) text. If the latter is not shown, then in wiki markup, the parameter's name should be omitted and only its value should be added immediately after the colon symbol (`:`).
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.
## Examples #### 1. Limit the number of entries displayed
    {rss:url=http://host.com/rss.xml|max=5}
#### 2. Show only the RSS feed titles
    {rss:url=http://host.com/rss.xml|showTitlesOnly=true}
#### 3. Hide the feeds titlebar
    {rss:url=http://host.com/rss.xml|titleBar=false}
## Working Example What you need to type:
    {rss:url=http://www.abc.net.au/news/syndicate/breakingrss.xml|max=5|showTitlesOnly=true}
What you will get:
ABC News: Breaking Stories (Latest ABC News)
Texas military base gunman 'harassed'
Indonesia extends Oceanic Viking's stay
HOG heaven revs up
Australian market surges on US optimism
Trio charged with drug trafficking
2. ## 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 onto your Confluence site. To enable caching: Using the Confluence Repository, 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:
       {cache:refresh=30m}
       {rss:url=http://rss.news.yahoo.com/rss/stocks|max=5}
       {cache}
The Cache plugin page provides more information on customising the cache behaviour. ## 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. A user can add the RSS macro or the HTML-include macro to a Confluence page. The macro code includes a URL from which the content is drawn. When the page is displayed, Confluence will check the URL against the whitelist. If the URL is not allowed, Confluence will display an error message on the page. The error message says that Confluence "could not access the content at the URL because it is not from an allowed source" and displays the offending URL. If the person viewing the page is a Confluence Administrator, they will also see a link to the Administration page where they can configure the URL whitelist. Here is an example of the error message, including the link shown only to Confluence Administrators: Here is an example of the error message, but without the link. ## Authentication ##### Adding Login Information for Confluence Feeds You can add your Confluence username and password to the feed URL, 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. ##### Private Feeds from External Sites RSS feeds which require authentication cannot be accessed using the RSS Macro. ## Accessing Internal HTTPS Feeds This applies only to Confluence instances which have enabled HTTPS for all content. 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. Use the SSL guide to re-enable HTTP access to Confluence. This means that Confluence will be accessible via both HTTP and HTTPS. 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. ##### RELATED TOPICS Subscribing to RSS Feeds within Confluence Adding a username and password to Confluence RSS feeds Tracking Updates Overview Working with Macros Configuring a URL Whitelist Return to the Confluence User Guide.

Document generated by Confluence on Nov 05, 2009 23:35