====== RSS ====== [[http://en.wikipedia.org/wiki/RSS|RSS]] technology allows you to syndicate your collection's content, so users who subscribe to your site will be informed of new content in their RSS/News Feeds. If you will be frequently adding new content to a collection, consider enabling RSS. This will allow your users to 'subscribe' to the collection, and keep track of updates. ===== Turn on RSS ===== To turn on RSS for a collection, go to the **Format Features** section of GLI's Format Panel. Select which page(s) on which you want the RSS link to appear (choose 'global' to have it appear on all pages of the collection). Add the following as the child of the root node (This simply means, do not put it inside any of the ''gsf:template'' elements. If in doubt, put it below all other statements.): In the default interface, the RSS icon will appear in the upper right-hand corner of the web page, as shown in the screenshot below. Clicking on the icon will present the list of updated content, and allow users to subscribe to the RSS feed for the collection. {{ :en:rss-gs3.png?direct&600 |}} NOTE: the RSS serviceRack must also be included in the collectionConfig.xml file (it should be there by default). If RSS is not working after setting the option to true, check that you have **** inside the **** of the collection's **etc/collectionConfig.xml** file. To turn on RSS for a collection, go to GLI's Format panel's Collection Specific Macros, and paste the following: package Global _optrsslink_ { _rsslink_ } Alternatively, you can just paste the above directly into your ''%%collect//macros/extra.dm%%'' file The RSS icon will appear in the upper right-hand corner of the web page, as shown in the screenshot below. Clicking on the icon will present the list of updated content, and allow users to subscribe to the RSS feed for the collection. {{ :en:rss-gs2.png?direct&600 |}} ===== Configuring RSS feed info ===== The data for the RSS feed is generated when the collection is (re)built. A file is created in the index folder of the collection: rss-items.rdf. The format is like: Recipe of The Week-Pumpkin Gingerbread Muffins (Nut-Free) _httpdomain__httpcollection_/document/HASH01547a1ae03355d22142bf77 Annabel Langbein's Walnut Salad _httpdomain__httpcollection_/document/HASH8b6e330cc072e5e713083e The _httpdomain_ and _httpcollection_ macros get replaced with the appropriate url components at runtime. The title used is dc.Title by default. To change this, you can set the plugout's ''-rss_title'' option to something else, eg ''dc.Title,Title''. It takes a comma separated list of metadata fields, in order of preference, from which the title for a document's RSS link is to be obtained. Another plugout option for RSS is to disable outputting the rdf file: ''-no_rss''. Note, plugouts are the opposite to plugins. Plugins handle converting document formats to Greenstone's internal representation. Plugouts take the internal representation and write them out to file. By default, the import process uses the GreenstoneXMLPlugout, which writes out documents as GreenstoneXML archive files. If you export a collection to another format e.g. MARCXML, then a different plugout will be used. These plugout options cannot currently be set using GLI. To change them, you will need to edit the collection's configuration file by hand. Make sure the collection is not open in GLI before you start editing the file. Once you have edited the file, save it, and rebuild the collection to regenerate the rss file. Open up the file //%%greenstone3/web/sites/localsite/collect//etc/collectionConfig.xml%%//. Inside the //%%%%// node, add code like the following: Open up the file //%%greenstone2/collect//etc/collect.cfg%%//. Add the line plugout GreenstoneXMLPlugout -rss_title "dc.Title,Title"