Translations of this page?:

XML Syndication

DokuWiki makes some of its data available as XML feed through the feed.php file. The feed can be subscribed in a newsreader.

The XML Syndication feature was implemented by using the excellent Feed Creator Class by Kai Blankenhorn.

Config Options

How the feed is produced can be configured through certain config options. When the feed.php is called without any arguments it will use these options to create the feed. All options can also be overriden by parameters passed in the URL.

Links

Each item in the created feed will have a link, this option specifies where this link points to.

  • Config Option: rss_linkto
  • URL Parameter: linkto
  • Default: diff
  • Possible Values:
Value Link Target
page the revison of the of the page when the feed was created
current the most current revision of the page
rev the revison view of the page
diff a diff view of the page changes

Feed Content

What is shown in the item bodies of the feed is controlled by this option.

  • Config Option: rss_content
  • URL Parameter: content
  • Default: abstract
  • Possible Values:
Value Item Content
abstract The first paragraph of a page
diff a plain text diff of the page changes
htmldiff a HTML formatted diff table of the page changes
html the full HTML rendered page content

Feed Format

DokuWiki can create XML feeds in multiple formats.

  • Config Option: rss_type
  • URL Parameter: type
  • Default: rss1
  • Possible Values:
Value Feed Format
rss RSS 0.91
rss1 RSS 1.0
rss2 RSS 2.0
atom ATOM 0.3
atom1 ATOM 1.0

List Mode

The feed.php can be used to export a list of recent changes (default) but can be used for other lists as well.

  • Config Option: none
  • URL Parameter: mode
  • Default: recent
  • Possible Values:
Value List Mode
recent list most recent pages with the newest on top
list simply list all pages of a namespace (see below for selecting which one)
search list pages matching a certain search query given through an additional parameter q

Namespace Filter

The feed can be limited to include pages of a certain namespace only.

  • Config Option: none
  • URL Parameter: ns
  • Default: *
  • Possible Values: any valid namespace

Item Limits

The number of pages listed in the feed can be controlled as well.

  • Config Option: recent
  • URL Parameter: num
  • Default: 20
  • Possible Values: any integer

Including Minor Edits

By default no minor edits will be shown in the feed. This can be changed by an URL argument.

  • Config Option: none
  • URL Parameter: minor
  • Default: 0
  • Possible Values: 0 or 1

Caching

XML feeds are cached to reduce the load on the wiki. This option controls how long feed caches are valid.

  • Config Option: rss_update
  • URL Parameter: none
  • Default: 5*60
  • Possible Values: time in seconds

Summaries

The summary of a page change will usually be included in the feed item title. This might be unwanted sometimes and can be disabled.

  • Config Option: rss_show_summary
  • URL Parameter: none
  • Default: 1
  • Possible Values: 0 or 1

Examples

Summary of URL parameters and Options

  • General syntax for RSS links from your own installation :
[[this>feed.php?URL_parameter1=Value_X&URL_parameter2=Value_X......&URL_parameterN=Value_X]]
Name : Links Feed Content Feed Format List Mode List Mode Namespace Filter Item Limits Including Minor Edits
URL Parameter: linkto= &content= &rss_type= &mode= &q= &ns= &num= &minor=
Default Value : : diff abstract rss1 recent Any name * 20 0
Value 2 : current diff rss list Any Name any integer 1
Value 3 : rev htmldiff rss2 search - - - -
Value 4 : page html atom - - - - -
Value 5 : - - atom1 - - - - -

Feeds and ACLs

When ACLs are enabled, read restricted pages will not be included in public feeds.

If you want to access feeds for restricted pages you have to pass your username and password along in the URL like this: ''http://example.com/dokuwiki/feed.php?u=username&p=password''.

:!: This is not very secure and might lead to the leakage of your user credentials. When DokuWiki is running atop of mod_php passing login credentials via HTTP Basic Auth as supported by some newsreaders might work as well.

See also

 
wiki/syndication.txt · Last modified: 2008/06/04 17:10 by 124.33.183.150
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate