Confluence 3.1 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
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.
警告: Web ページに不明な HTML を含めることは危険です。
RSS フィード内のの HTML には、アクティブなスクリプト コンポーネントが含まれる場合があります。つまり、不正な攻撃者がサイト ユーザーにスクリプトを示し、ユーザーの Web ブラウザーがそれを貴社のものと判断してしまう可能性があります。これらのコードは、ユーザーの認証 cookie を盗んだり、攻撃者にユーザーの Confluence ログイン パスワードを提供するためなどに使用されることがあります。
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
To insert the RSS feed macro into a page using the Macro Browser,
- Open your desired Confluence page or blog post, then click the 'Edit' button. The page or blog post opens in edit mode.
- Click the Macro Browser icon on the toolbar. The macro browser window opens in the middle of the screen in 'macro selection' mode.
- Scroll through the list of macros. Alternatively, start typing part of the name of your desired macro into the search box at the top right of the macro browser window. Macros with a matching name will appear in the main pane.
- Click on the desired macro to access its parameters and preview parameter changes ('preview mode').
- Set the macro parameters to your requirements. If desired, you can preview these changes by clicking 'Refresh'.
- 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 are options that you can include in Confluence macros to control the content or format of the macro output. The table below lists relevant parameters for this macro.
Parameter names are different in the macro browser and in wiki markup. Below we show the macro browser parameter names in bold text, and the equivalent wiki markup parameters in (bracketed
) text. If we do not show any parameter name for the wiki markup, then you should leave out the parameter name and simply include the parameter value as the first parameter, immediately after the colon (:
).
パラメーター |
必須かどうか |
既定 |
説明 |
---|---|---|---|
RSS Feed URL |
はい |
なし |
表示したい RSS フィード リンクの URL。 |
Maximum Number of Entries |
いいえ |
15 |
表示されるエントリ数を指定します。 |
Show Item Titles Only |
いいえ |
false |
新しい項目のタイトルのみ (コンテンツではない) を表示します。 |
Show Name/Title of RSS Feed |
いいえ |
true |
フィードのタイトル バーを非表示にします。 |
例
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
必要な入力項目
{rss:url=http://www.abc.net.au/news/syndicate/breakingrss.xml|max=5|showTitlesOnly=true}
表示結果:
How Up to Date is the Feed?
既定では、RSS フィード マクロはデータを再度取得するまで、60 分の間フィード結果をキャッシュします。
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:
The Cache plugin page provides more information on customising the cache behaviour.
{cache:refresh=30m} {rss:url=http://rss.news.yahoo.com/rss/stocks|max=5} {cache}
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.
Confluence が「URL のコンテンツへアクセスできません。許可されているソースのものではありません。」というエラーメッセージとともに、攻撃側の URL が表示されます。 このページを閲覧している人物が Confluence 管理者の場合、URL ホワイトリストを設定できる管理ページへのリンクも表示されます。
Confluence 管理者にのみ表示されるリンクを含むエラーメッセージの例:
エラーメッセージの例 (リンクなし)。
認証
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:
- Confluence をシャットダウンします。
- Consult the SSL guide 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
Adding a username and password to Confluence RSS feeds
Tracking Updates Overview
Working with Macros
Configuring a URL Whitelist
Return to the Confluence User's Guide.