OrderBy module or similar should be used
to order the documents prior to this module. You should also set the Settings.Host value
in your configuration file since that's used to create the absolute links for feed readers.
This module outputs a document for each of the selected feed types. Input documents
are not output by this module.
Package
#n Wyam.Feeds
Usage
GenerateFeeds()
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
MaximumItems(int maximumItems)Sets how many items the feed will contain. The default value is 20. Note that documents will be used in the order in which they are input into this module, so a
OrderBymodule or similar should be used to order the documents prior to this module.maximumItemsThe maximum number of items.
-
WithAtomPath(ContextConfig atomPath)Sets the path to the generated Atom file. The default behavior is to generate a RSS feed with a path of "feed.atom".
atomPathA delegate that should return a
Wyam.Common.IO.FilePathfor the Atom path. If the delegate isnullor returnsnull, no Atom file will be generated.
-
WithFeedAuthor(ContextConfig feedAuthor)Sets the feed author. The default value is the value for the "Author" key in the global metadata.
feedAuthorA delegate that should return a
stringwith the feed author.
-
WithFeedCopyright(ContextConfig feedCopyright)Sets the feed copyright. The default value is the value for the "Copyright" key in the global metadata.
feedCopyrightA delegate that should return a
stringwith the feed copyright.
-
WithFeedDescription(ContextConfig feedDescription)Sets the feed description. The default value is the value for the "Description" key in the global metadata.
feedDescriptionA delegate that should return a
stringwith the feed description.
-
WithFeedId(ContextConfig feedId)Sets the feed identifier. The default value is a link to the site.
feedIdA delegate that should return a
Uriwith the feed identifier.
-
WithFeedImageLink(ContextConfig feedImageLink)Sets the feed image link. The default value is the value for the "Image" key in the global metadata.
feedImageLinkA delegate that should return a
Uriwith the feed image link.
-
WithFeedLink(ContextConfig feedLink)Sets the feed image link. The default value is the site link.
feedLinkA delegate that should return a
Uriwith the feed link.
-
WithFeedPublished(ContextConfig feedPublished)Sets the feed published time. The default value is the current UTC time.
feedPublishedA delegate that should return a
DateTimewith the feed published time.
-
WithFeedTitle(ContextConfig feedTitle)Sets the feed title. The default value is the value for the "Title" key in the global metadata.
feedTitleA delegate that should return a
stringwith the feed title.
-
WithFeedUpdated(ContextConfig feedUpdated)Sets the feed updated time. The default value is the current UTC time.
feedUpdatedA delegate that should return a
DateTimewith the feed updated time.
-
WithItemAuthor(DocumentConfig itemAuthor)Sets the item author. The default value is the value for the "Author" key in the input document.
itemAuthorA delegate that should return a
stringwith the item author.
-
WithItemContent(DocumentConfig itemContent)Sets the content of the item. The default value is the value for the "Content" key in the input document. Note that the entire document content is not used because it will most likely contain layout, scripts, and other code that shouldn't be part of the feed item.
itemContentA delegate that should return a
stringwith the content of the item.
-
WithItemDescription(DocumentConfig itemDescription)Sets the item description. The default value is the value for the "Description" key in the input document.
itemDescriptionA delegate that should return a
stringwith the item description.
-
WithItemId(DocumentConfig itemId)Sets the item identifier. The default value is the absolute link to the input document.
itemIdA delegate that should return a
Uriwith the item identifier.
-
WithItemImageLink(DocumentConfig itemImageLink)Sets the item image link. The default value is the value for the "Image" key in the input document.
itemImageLinkA delegate that should return a
Uriwith the item image link.
-
WithItemLink(DocumentConfig itemLink)Sets the item link. The default value is the absolute link to the input document.
itemLinkA delegate that should return a
Uriwith the item link.
-
WithItemPublished(DocumentConfig itemPublished)Sets the item published time. The default value is the value for the "Published" key in the input document.
itemPublishedA delegate that should return a
DateTimewith the item published time.
-
WithItemThreadCount(DocumentConfig itemThreadCount)Sets the item thread count. By default, no thread count is specified.
itemThreadCountA delegate that should return an
intwith the item thread count.
-
WithItemThreadLink(DocumentConfig itemThreadLink)Sets the item thread link. By default, no thread link is specified.
itemThreadLinkA delegate that should return a
Uriwith the item thread link.
-
WithItemThreadUpdated(DocumentConfig itemThreadUpdated)Sets the item thread updated. By default, no thread updated time is specified.
itemThreadUpdatedA delegate that should return a
DateTimewith the item thread updated time.
-
WithItemTitle(DocumentConfig itemTitle)Sets the item title. The default value is the value for the "Title" key in the input document.
itemTitleA delegate that should return a
stringwith the item title.
-
WithItemUpdated(DocumentConfig itemUpdated)Sets the item updated time. The default value is the value for the "Updated" key in the input document.
itemUpdatedA delegate that should return a
DateTimewith the item updated time.
-
WithRdfPath(ContextConfig rdfPath)Sets the path to the generated RDF file. The default behavior is not to generate a RDF feed.
rdfPathA delegate that should return a
Wyam.Common.IO.FilePathfor the RDF path. If the delegate isnullor returnsnull, no RDF file will be generated.
-
WithRssPath(ContextConfig rssPath)Sets the path to the generated RSS file. The default behavior is to generate a RSS feed with a path of "feed.rss".
rssPathA delegate that should return a
Wyam.Common.IO.FilePathfor the RSS path. If the delegate isnullor returnsnull, no RSS file will be generated.
Input Metadata
The metadata values listed below apply to individual documents and are typically set from front matter (with just the name of the key) and used as inputs to the module to control behavior.
-
FeedKeys.Author:System.StringThe default metadata key for getting the author of feed items.
-
FeedKeys.Content:System.StringThe default metadata key for getting the content of feed items.
-
FeedKeys.Copyright:System.StringThe default metadata key for getting the copyright of feed items.
-
FeedKeys.Description:System.StringThe default metadata key for getting the description of feed items.
-
FeedKeys.Excerpt:System.StringThe default metadata key for getting the excerpt of feed items. The exceprt is typically only used for the feed item if a description is not provided.
-
FeedKeys.Image:System.StringThe default metadata key for getting the image of feed items.
-
FeedKeys.Published:System.StringThe default metadata key for getting the published date of feed items.
-
FeedKeys.Title:System.StringThe default metadata key for getting the title of feed items.
-
FeedKeys.Updated:System.StringThe default metadata key for getting the updated date of feed items.
Output Metadata
The metadata values listed below apply to individual documents and are created and set by the module as indicated in their descriptions.
-
Keys.RelativeFilePath:Wyam.Common.IO.FilePathRelative path to the output feed file.
-
Keys.WritePath:Wyam.Common.IO.FilePathThe path to use when writing the file.
