Executes the shortcode and returns an
IDocument with the shortcode result content and metadata.
- Namespace
- Statiq
.Common - Containing Type
- MultiShortcode
- Implements
Syntax
public abstract Task<IEnumerable<ShortcodeResult>> ExecuteAsync(KeyValuePair<string, string>[] args, string content, IDocument document, IExecutionContext context)
Parameters
| Name | Type | Description |
|---|---|---|
| args | KeyValuePair |
The arguments declared with the shortcode. This contains a list of key-value pairs in the order
they appeared in the shortcode declaration. If no key was specified, then the System.Collections.Generic.KeyValuePair`2.Key
property will be null.
|
| content | string | The content of the shortcode. |
| document | IDocument | The current document (including metadata from previous shortcodes in the same document). |
| context | IExecutionContext | The current execution context. |
Return Value
| Type | Description |
|---|---|
| Task |
A collection of shortcode results or null to remove the shortcode from the document without adding replacement content.
|