Generates syndication feeds including RSS, Atom, and RDF.
- Namespace
- Statiq
.Feeds - Interfaces
- Base Types
-
- object
- Module
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 |
GenerateFeeds |
Indicates whether relative links in the description and content should be changed to absolute (the default is
true ).
|
AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
ExecuteAsync |
Task |
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 |
Task |
Executes the module once for all input documents.
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from Module
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
MaximumItems |
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 |
GenerateFeeds |
By default documents are sorted in descending publish order. Use this
method to preserve their input document ordering instead.
|
WithAtomPath |
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 |
GenerateFeeds |
Sets the feed author. The default value is the value for the "Author" key
in the global metadata.
|
WithFeedCopyright |
GenerateFeeds |
Sets the feed copyright. The default value is the value for the "Copyright" key
in the global metadata.
|
WithFeedDescription |
GenerateFeeds |
Sets the feed description. The default value is the value for the "Description" key
in the global metadata.
|
WithFeedId |
GenerateFeeds |
Sets the feed identifier. The default value is a link to the site.
|
WithFeedImageLink |
GenerateFeeds |
Sets the feed image link. The default value is the value for the "Image" key
in the global metadata.
|
WithFeedLink |
GenerateFeeds |
Sets the feed image link. The default value is the site link.
|
WithFeedPublished |
GenerateFeeds |
Sets the feed published time. The default value is the current UTC time.
|
WithFeedTitle |
GenerateFeeds |
Sets the feed title. The default value is the value for the "Title" key
in the global metadata.
|
WithFeedUpdated |
GenerateFeeds |
Sets the feed updated time. The default value is the current UTC time.
|
WithItemAuthor |
GenerateFeeds |
Sets the item author. The default value is the value for the "Author" key
in the input document.
|
WithItemContent |
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 |
GenerateFeeds |
Sets the item description. The default value is the value for the "Description" key
in the input document.
|
WithItemId |
GenerateFeeds |
Sets the item identifier. The default value is the absolute link to the input document.
|
WithItemImageLink |
GenerateFeeds |
Sets the item image link. The default value is the value for the "Image" key
in the input document.
|
WithItemLink |
GenerateFeeds |
Sets the item link. The default value is the absolute link to the input document.
|
WithItemPublished |
GenerateFeeds |
Sets the item published time. The default value is the value for the "Published" key
in the input document.
|
WithItemThreadCount |
GenerateFeeds |
Sets the item thread count. By default, no thread count is specified.
|
WithItemThreadLink |
GenerateFeeds |
Sets the item thread link. By default, no thread link is specified.
|
With |
GenerateFeeds |
Sets the item thread updated. By default, no thread updated time is specified.
|
WithItemTitle |
GenerateFeeds |
Sets the item title. The default value is the value for the "Title" key
in the input document.
|
WithItemUpdated |
GenerateFeeds |
Sets the item updated time. The default value is the value for the "Updated" key
in the input document.
|
WithRdfPath |
GenerateFeeds |
Sets the path to the generated RDF file. The default behavior is not to generate a RDF feed.
|
WithRssPath |
GenerateFeeds |
Sets the path to the generated RSS file. The default behavior is to generate a RSS feed with
a path of "feed.rss".
|