GenerateFeeds Class
Generates syndication feeds including RSS, Atom, and RDF.
Namespace
Statiq.Feeds
Interfaces
Base Types
graph BT Type-->Base0["Module"] click Base0 "/api/Statiq.Common/Module" Base0-->Base1["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type["GenerateFeeds"] class Type type-node

Syntax

public class GenerateFeeds : Module, IModule

Remarks

Each input document represents an item in the feed, up to the specified maximum number of documents. Note that documents will be sorted in descending order of their published date to correspond with conventional feed behavior. If you want to use a different ordering, sort the documents before using this module and call PreserveOrdering(bool). You should also configure the "Host" setting since that's used to create absolute links. This module outputs a document for each of the selected feed types. Input documents are not output by this module.

Fields

Name Field Type Constant Value Summary
DefaultAtomPath NormalizedPath
The default path for Atom files.
static
DefaultRdfPath NormalizedPath
The default path for RDF files.
static
DefaultRssPath NormalizedPath
The default path for RSS files.
static

Methods

Name Return Value Summary
AbsolutizeLinks(bool) GenerateFeeds
Indicates whether relative links in the description and content should be changed to absolute (the default is true).
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module.
Inherited from Module
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
MaximumItems(int) GenerateFeeds
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 OrderBy module or similar should be used to order the documents prior to this module. Use a value of 0 to include all input documents.
PreserveOrdering(bool) GenerateFeeds
By default documents are sorted in descending publish order. Use this method to preserve their input document ordering instead.
WithAtomPath(NormalizedPath) GenerateFeeds
Sets the path to the generated Atom file. The default behavior is to generate a RSS feed with a path of "feed.atom".
WithFeedAuthor(string) GenerateFeeds
Sets the feed author. The default value is the value for the "Author" key in the global metadata.
WithFeedCopyright(string) GenerateFeeds
Sets the feed copyright. The default value is the value for the "Copyright" key in the global metadata.
WithFeedDescription(string) GenerateFeeds
Sets the feed description. The default value is the value for the "Description" key in the global metadata.
WithFeedId(string) GenerateFeeds
Sets the feed identifier. The default value is a link to the site.
WithFeedImageLink(Uri) GenerateFeeds
Sets the feed image link. The default value is the value for the "Image" key in the global metadata.
WithFeedLink(Uri) GenerateFeeds
Sets the feed image link. The default value is the site link.
WithFeedPublished(DateTime?) GenerateFeeds
Sets the feed published time. The default value is the current UTC time.
WithFeedTitle(string) GenerateFeeds
Sets the feed title. The default value is the value for the "Title" key in the global metadata.
WithFeedUpdated(DateTime?) GenerateFeeds
Sets the feed updated time. The default value is the current UTC time.
WithItemAuthor(Config<string>) GenerateFeeds
Sets the item author. The default value is the value for the "Author" key in the input document.
WithItemContent(Config<string>) GenerateFeeds
Sets the content of the item. The default value is the value for the "Content" key in the input document. If that is undefined, the current document content will be used.
WithItemDescription(Config<string>) GenerateFeeds
Sets the item description. The default value is the value for the "Description" key in the input document.
WithItemId(Config<string>) GenerateFeeds
Sets the item identifier. The default value is the absolute link to the input document.
WithItemImageLink(Config<Uri>) GenerateFeeds
Sets the item image link. The default value is the value for the "Image" key in the input document.
WithItemLink(Config<Uri>) GenerateFeeds
Sets the item link. The default value is the absolute link to the input document.
WithItemPublished(Config<DateTime?>) GenerateFeeds
Sets the item published time. The default value is the value for the "Published" key in the input document.
WithItemThreadCount(Config<int>) GenerateFeeds
Sets the item thread count. By default, no thread count is specified.
WithItemThreadLink(Config<Uri>) GenerateFeeds
Sets the item thread link. By default, no thread link is specified.
WithItemThreadUpdated(Config<DateTime?>) GenerateFeeds
Sets the item thread updated. By default, no thread updated time is specified.
WithItemTitle(Config<string>) GenerateFeeds
Sets the item title. The default value is the value for the "Title" key in the input document.
WithItemUpdated(Config<DateTime?>) GenerateFeeds
Sets the item updated time. The default value is the value for the "Updated" key in the input document.
WithRdfPath(NormalizedPath) GenerateFeeds
Sets the path to the generated RDF file. The default behavior is not to generate a RDF feed.
WithRssPath(NormalizedPath) GenerateFeeds
Sets the path to the generated RSS file. The default behavior is to generate a RSS feed with a path of "feed.rss".

Extension Methods