IShortcode Interface
Contains the code for a given shortcode.
graph BT Type["IShortcode"] class Type type-node Implementing0["TableShortcode"]-.->Type click Implementing0 "/api/Statiq.Web.Shortcodes/TableShortcode" Implementing1["YouTubeShortcode"]-.->Type click Implementing1 "/api/Statiq.Web.Shortcodes/YouTubeShortcode" Implementing2["SyncMultiShortcode"]-.->Type click Implementing2 "/api/Statiq.Common/SyncMultiShortcode" Implementing3["GiphyShortcode"]-.->Type click Implementing3 "/api/Statiq.Web.Shortcodes/GiphyShortcode" Implementing4["HighlightShortcode"]-.->Type click Implementing4 "/api/Statiq.Highlight/HighlightShortcode" Implementing5["SyncShortcode"]-.->Type click Implementing5 "/api/Statiq.Common/SyncShortcode" Implementing6["Shortcode"]-.->Type click Implementing6 "/api/Statiq.Common/Shortcode" Implementing7["FigureShortcode"]-.->Type click Implementing7 "/api/Statiq.Web.Shortcodes/FigureShortcode" Implementing8["IncludeShortcode"]-.->Type click Implementing8 "/api/Statiq.Core/IncludeShortcode" Implementing9["CodePenShortcode"]-.->Type click Implementing9 "/api/Statiq.Web.Shortcodes/CodePenShortcode" Implementing10["MetaShortcode"]-.->Type click Implementing10 "/api/Statiq.Core/MetaShortcode" Implementing11["MarkdownShortcode"]-.->Type click Implementing11 "/api/Statiq.Markdown/MarkdownShortcode" Implementing12["EmbedShortcode"]-.->Type click Implementing12 "/api/Statiq.Web.Shortcodes/EmbedShortcode" Implementing13["MultiShortcode"]-.->Type click Implementing13 "/api/Statiq.Common/MultiShortcode" Implementing14["EvalShortcode"]-.->Type click Implementing14 "/api/Statiq.Core/EvalShortcode" Implementing15["LinkShortcode"]-.->Type click Implementing15 "/api/Statiq.Web.Shortcodes/LinkShortcode" Implementing16["TwitterShortcode"]-.->Type click Implementing16 "/api/Statiq.Web.Shortcodes/TwitterShortcode" Implementing17["RawShortcode"]-.->Type click Implementing17 "/api/Statiq.Core/RawShortcode" Implementing18["ForEachShortcode"]-.->Type click Implementing18 "/api/Statiq.Core/ForEachShortcode" Implementing19["GistShortcode"]-.->Type click Implementing19 "/api/Statiq.Web.Shortcodes/GistShortcode" Implementing20["IfShortcode"]-.->Type click Implementing20 "/api/Statiq.Core/IfShortcode"

Syntax

public interface IShortcode

Remarks

Shortcode instances are created once-per-document and reused for the life of that document. An exception is that nested shortcodes are always processed by a new instance of the shortcode implementation (which remains in use for that nested content). If a shortcode class also implements IDisposable, the shortcode will be disposed at the processing conclusion.

Methods

Name Return Value Summary
ExecuteAsync(KeyValuePair<string, string>[], string, IDocument, IExecutionContext) Task<IEnumerable<ShortcodeResult>>
Executes the shortcode and returns an IDocument with the shortcode result content and metadata.

Extension Methods