How can I add links that will enable autodiscovery of my site's Atom and/or RSS feeds?
<link rel='alternate' title='Your Site : Main - RSS Feed' href='http://example.com/wiki/Main/RecentChanges?action=rss' type='application/rss+xml' /> <link rel='alternate' title='Your Site : Main - Atom Feed' href='http://example.com/wiki/Main/RecentChanges?action=atom' type='application/atom+xml' />
By default the script will produce RSS 2.0 and Atom links the site-wide AllRecentChanges page ($SiteGroup/AllRecentChanges). If you want to override the defaults you can pass settings to the script.
For example, to advertise RSS 2.0 feeds by group, use
## Enable the feedlinks recipe, which adds HTML header links that enable ## "autodiscovery" of the site's Atom and/or RSS web feeds. $EnableSitewideFeed = 0; $EnableRssLink = 1; $EnableAtomLink = 0; include_once("$FarmD/cookbook/feedlinks.php"); # RSS 2.0 feeds by group
or to advertise RSS and Atom links to a sitewide feed at Main/AllRecentChanges instead of the default $SiteGroup/AllRecentChanges, use
## Enable the feedlinks recipe; Sitewide RSS 2.0 and Atom Feeds $FeedLinkSourcePath = 'Main/AllRecentChanges'; include_once("$FarmD/cookbook/feedlinks.php");
SteP 2009-09-14: I think the code needs changing to support setting feed source and title on a per-group basis. Replace these two lines
$FeedLinkSourcePath = '$[$Group/RecentChanges]'; $FeedLinkTitleGroup = ' : $[$Group] -';
SDV($FeedLinkSourcePath, '$[$Group/RecentChanges]'); SDV($FeedLinkTitleGroup, ' : $[$Group] -');
Unfortunately, this causes the run-multiple-times feature to break!
But there is a solution that lets you do both (set-per-group and run-multiple-times); I've uploaded a version with that fix (v0.1).
Said Achmiz November 04, 2017, at 01:38 AM
- 2006-01-13: Version 0.01 (Initial release)
- 2006-01-15: Version 0.02
- 2006-03-19: Version 0.03 Now can be run multiple times with setting changes in between.
- 2017-11-04: Version 0.1 Now feed source and title can be set on a per-group basis.
See discussion at FeedLinks-Talk