IUriExportStrategy
Contents
[
Hide
]
IUriExportStrategy interface
Defines a strategy for customizing resource URIs that are written into the Markdown output during conversion.
public interface IUriExportStrategy
Methods
| Name | Description |
|---|---|
| UpdateResourceUri(UriExportContext) | Called for each resource URI that will be written to the Markdown output. Modify properties on context to customize the resulting URI. |
Remarks
Implement this interface to rewrite or transform the URIs that reference images or other external resources in the generated Markdown. For example, you can prepend a CDN base URL or change relative paths to absolute URLs.
Examples
Prepend a CDN base URL to every resource URI:
public class CdnUriExportStrategy : IUriExportStrategy
{
public void UpdateResourceUri(UriExportContext context)
{
context.ResourceFileUri = "https://cdn.example.com/assets/" + context.ResourceFileName;
}
}
See Also
- namespace GroupDocs.Markdown
- assembly GroupDocs.Markdown