Questions answered by this recipe
- How can I add links that will enable autodiscovery of my site's Atom and/or RSS feeds?
- How can I encourage people (and machines) to use my site's web feeds?
Add RSS and/or Atom feed link tags as alternate link elements to your pages' HTML Headers. Typical feed links look like this:
These alternate link elements make audodiscovery of your feeds possible, meaning browsers and other software will be able to automatically find the feeds you've made available.
By default the script produces links to RSS 2.0 and Atom feeds from the site-wide $SiteGroup/AllRecentChanges page. You can customize the links to your preference using settings.
- Enabled by default, this can be disabled to advertise by-group from the $Group/RecentChanges page instead.
- Enabled by default, this produces a link to an RSS 2.0 feed.
- Enabled by default, this produces a link to an Atom feed.
- This allows you to override the feed link's source path and use a custom one instead.
To advertise only an RSS feed of WikiGroup changes from the $Group/RecentChanges page instead of $SiteGroup/AllRecentChanges, use
You can run the script multiple times, so if you want site-wide and by-group RSS and Atom feed links (four links total), use
Feed-Friendly AllRecentChanges Page
The CMS Mode recipe creates a special feed-friendly AllRecentChanges page in the Main/ group. Here's the code from cmsmode.php that does that:
To advertise both RSS and Atom links to the special sitewide feed at Main/AllRecentChanges rather than the default $SiteGroup/AllRecentChanges, use
Make sure your feeds are enabled. You can enable both RSS and Atom feeds using the following in your local/config.php file:
A version of the scriptΔ was uploaded that provides compatibility with the PageFeed recipe at the expense of the script's original simplicity. Those changes were significant enough, and narrow enough in scope, to merit forking the recipe into a separate one. See: FeedLinks-Talk#feedlinks4pagefeed
Change log / Release notes
- 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 the feed source and title can be set on a per-group basis.
- 2018-02-08: Version 0.2 Extension for pagefeed.php links and UrlVariables FranzFrese.
- 2018-02-10: Version 0.3 Revert pagefeed extensions and add / improve code comments.
- PmWiki.WebFeeds - Web feed notification of changes
- Cookbook.OpenSearch - Add OpenSearch autodiscovery & suggestions to PmWiki
- Cookbook.PageFeed - Creates RSS feeds from page histories
- Hagan 2006-01-13 Created the recipe on a suggestion by HansB.
- Said Achmiz - Added set-per-group and run-multiple-times capabilities.
- Franz Frese - Contributed a version that adds compatibility with the PageFeed recipe.
See discussion at FeedLinks-Talk