Calls an oEmbed endpoint and renders the embedded content.
- Namespace
- Statiq
.Web .Shortcodes - Interfaces
- Base Types
-
- object
- Shortcode
- Derived Types
graph BT
Type-->Base0["Shortcode"]
click Base0 "/api/Statiq.Common/Shortcode"
Base0-->Base1["object"]
Type-.->Interface0["IShortcode"]
click Interface0 "/api/Statiq.Common/IShortcode"
Type["EmbedShortcode"]
class Type type-node
Derived0["YouTubeShortcode"]-->Type
click Derived0 "/api/Statiq.Web.Shortcodes/YouTubeShortcode"
Derived1["GiphyShortcode"]-->Type
click Derived1 "/api/Statiq.Web.Shortcodes/GiphyShortcode"
Derived2["CodePenShortcode"]-->Type
click Derived2 "/api/Statiq.Web.Shortcodes/CodePenShortcode"
Derived3["TwitterShortcode"]-->Type
click Derived3 "/api/Statiq.Web.Shortcodes/TwitterShortcode"
Syntax
public class EmbedShortcode : Shortcode, IShortcode
Examples
<?# Embed https://codepen.io/api/oembed https://codepen.io/gingerdude/pen/JXwgdK /?>
Remarks
See https://oembed.com/ for details on the oEmbed standard and available endpoints.
Fields
Name | Field Type | Constant Value | Summary |
---|---|---|---|
Endpoint | string | Endpoint |
static
|
Format | string | Format |
static
|
MaxHeight | string | MaxHeight |
static
|
MaxWidth | string | MaxWidth |
static
|
Url | string | Url |
static
|
Methods
Name | Return Value | Summary |
---|---|---|
ExecuteAsync |
Task |
Shortcodes for specific oEmbed services should override this method and call one of the other execute helper methods.
|
ExecuteAsync |
Task |
|
GetEmbedResultAsync |
Task |
|
GetEmbedResultAsync |
Task |