RSS

From Support Wiki
Jump to navigation Jump to search
RSS
Requirements MediaWiki 1.23 or greater
Description
Display RSS feeds on a wiki page
Default?
NoN

RSS is an extension that allows you to display RSS feeds on an article.

Usage

Define a feed

At MediaWiki:Rss-feed , format the feed. You have a few variables available to you:

  • {{{date|}}} - the data the current RSS feed item was published
  • {{{title|}}} - the title of the current RSS feed item
  • {{{author|}}} - the author of the current RSS feed item
  • {{{link|}}} - a link to the current RSS feed item

Here is an example format you might want to use that will display the date and then the title, with the title linked to the item. The author is not displayed here. The entire item is bolded and wrapped in a div with class rss-feed.

<div class="rss-feed">'''{{{date}}} <span class="plainlinks">[{{{link}}} {{{title}}}]</span>'''</div>

Embed a feed

You will embed the feed at a template page that gets included somewhere else on your wiki, for example the front page.

The basic form of this embed is: <rss>https://link-to-rss-feed-here</rss>. You may wish to surround this element with a p or div. There are several attributes you can pass to the opening <rss> tag, including:

  • date="" - a string instructing how to format the {{{date|}}} param. For example, write date="Y-m-d" to format it like 2000-03-14.
  • max="" - the max number of entries that can be included in this feed, for example max="5" to show only the 5 most-recent entries.
  • filter="" - include only entries whose titles match this string. For example, filter="Patch" to restrict to patch notes. Note, this functionality is dependent on how the particular feed formats its titles and will only work as long as they are consistent.
  • filterout="" - exclude entries whose titles match this string. For example, filterout="Experimental".

You can see a complete list of config documentation at the mediawiki.org documentation page for this extension.

Examples on wiki.gg wikis